Arrow keys not working in firefox with given javascript

<p>I have one textbox coded like below :</p><pre><br /><code><input name="txttelephone" type="text" maxlength="16" id="txttelephone" class="InputTextBox" onkeypress="return NumbersOnly(event);" required /><br /></code><br /></pre><p>And javascript function is like below :</p><pre><br /><code>function NumbersOnly(e) {<br /> var unicode = e.charCode ? e.charCode : e.keyCode;<br /> if (unicode != 8) {<br /> if (unicode < 48 || unicode > 57) {<br /><br /> if (unicode == 9)<br /> return true;<br /> else<br /> return false;<br /> }<br /> }<br />}<br /></code><br /></pre><p>Now When I run this in chrome arrow keys working proper but in firefox arrow key is not working. Not getting what is the issue.</p><p>Please help me with this.</p><p>Thanks,</p><p>Dipa</p><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34470225/arrow-keys-not-working-in-firefox-with-given-javascript">http://ift.tt/1OesaRM</a></h2>

Nhận xét

Bài đăng phổ biến từ blog này

Align div to bottom of the page in bootstrap

Align elements inside an tag vertically

Javascript is unable to stop page loading