Friday 7 May 2021

JQUERY28

 <html>

<head>

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

<script>

$(document).ready(function() {

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

alert($("#myselection").val());

});

});

</script>

</head>

<body>

<div>

<p>The selected value:</p>

<select id="myselection">

<option value="1">First</option>

<option value="2">Second</option>

</select>

<br>

<br>

<button id="submit">Submit</button>

</div>

</body>

</html>