How to remove digits after decimal using Javascript?
<p>I am using numeric in an HTML web page. The problem is that I want numbers without decimals.</p>

<pre><code> &lt;!DOCTYPE html&gt;
 &lt;html&gt;
 &lt;head&gt;
</code></pre>

<p>//Script For Code</p>

<pre><code> &lt;script&gt;
 function copyText()
 {
 var mynumber=document.getElementById("field1").value;
 alert(mynumber);

  var mytest=parseInt(mynumber);


  }
 &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;

 Field1: &lt;input type="number" id="field1" value="123.124" /&gt;&lt;br /&gt;
 &lt;br /&gt;&lt;br /&gt;
 &lt;button onclick="copyText()"&gt;Check Number&lt;/button&gt;

 &lt;p&gt;A function is triggered when the button is clicked. The function copies the text in    Field1 to Field2.&lt;/p&gt;

 &lt;/body&gt;
 &lt;/html&gt;
</code></pre>

<p>//End of Code</p>
