Find numeric number from the text in javascript

Subject : Find numeric number from the text in javascript

 

Learn how to find find numeric number from the text  using javascript.

 

Code :

 

    function isNumberKey() {

 

        var i = document.getElementById("product").value.replace(/\D/g, '');

      

        document.getElementById("TextBox1").value = i;

 

    }

 

 

Use this function , it will take the value of textbox named ‘product'  and it will find all number and assign to variable I and store its value in textbox1