Tuesday, 4 May 2021

JQUERY4

 <html>

<head>

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

<script>

$(document).ready(function() {

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

$("#sName").attr('disabled', !$("#sName").attr('disabled'));

});

});

</script>

</head>

<body>

<input type="checkbox" id="sName" name= "MILK" style="width: 25px" value="MILK" disabled="disabled"/>Ice-Cream

<br><br>

<input type="button" id="button1" value="Disable/ Enable" />

</body>

</html>