I am using numeric in an HTML web page. The problem is that I want numbers without decimals.
function copyText() {
var mynumber = document.getElementById("field1").value;
alert(mynumber);
var mytest = parseInt(mynumber);
}
Field1: <input type="number" id="field1" value="123.124" /><br /><br />
<button onclick="copyText()">Check Number</button>
<p>A function is triggered when the button is clicked. The function copies the text in Field1 to Field2.</p>