Wednesday, 27 April 2022

Juqery form data example

 1)<!DOCTYPE html>

<html>

<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

<script>

$(document).ready(function(){

  $("button").click(function(){

    var a=$("#test").val();

    document.write(a);

  });

});

</script>

</head>

<body>


<p>Name: <input type="text" id="test" value="Mickey Mouse"></p>


<button>Show Value</button>


</body>

</html>


No comments:

Post a Comment