Saved X
Google login
SignUp with Email
X

Accessing via name jquery

theindreshverma ( Edited  Sep 01, 11:11 pm )
Login

accessing via name jquery

<html>
<head>
   <title>accessing via name jquery</title>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>

<p id="show"></p>
<input type="text" name="byname" /><br><br>
<button name="get">Access</button>

<script>
$('button[name="get"]').click(function(){
   var txt = $('input[name="byname"]').val();
   $('#show').text(txt);
});
</script>

</body>
</html>

Sourcecode Tags

More Sourcecodes

More Sourcecodes