Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Showing posts with label onkeydown. Show all posts
Showing posts with label onkeydown. Show all posts
Friday, 12 September 2014
Friday, 11 April 2014
Input field enter integer only
Here's an example that limits a form field to contain only numeric input (on the fly, of course!).
<script type="text/javascript"> function numbersonly(e){ var unicode=e.charCode? e.charCode : e.keyCode if (unicode!=8){ //if the key isn't the backspace key (which we should allow) if (unicode<48||unicode>57) //if not a number return false //disable key press } } </script> <form> <input type="text" size=18 onkeypress="return numbersonly(event)"> </form>
Subscribe to:
Posts (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
-
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
-
ISAIMINI.COM Download
-
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }