Thursday 6 May 2021

JQUERY31

 

<html>

<head>

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

<script>

$(document).ready(function(){

$("#Get").click(function () {

//alert("hi");

$('#msg').html($('#inputboxval').val());

});

 

$("#Set").click(function () {

$('#inputboxval').val("Adhira");

$('#msg').html($('#inputboxval').val());

});

 

$("#Reset").click(function () {

$('#msg').html("");

$('#inputboxval').val("");

});

});

</script>

</head>

<body>

<h2>TextBox value : <label id="msg"></label></h2>

TextBox : <input type="textbox" value="Type something"  id="inputboxval"></input>

<button id="Get">Get TextBox Value</button>

<button id="Set">Set To "Adhira"</button>

<button id="Reset">Reset</button>

</body>

</html>