Friday, 7 May 2021

JQUERY30

 

<html>

<head>

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

<script>

$(document).ready(function(){

$('.numbers').keyup(function () {

this.value = this.value.replace(/[^0-9\.]/g,'');

});

});

</script>

<body>

<p>Enter the Number:

<input type="text" class="numbers" value="" /></p>

</body>

</html>