Input Validation - Letter and Numbers: <input onkeypress='return IsAlphNum(event)' />
function JSHead() { alert('JavaScript within the Head Tag') }
function IsAlphNum(e) { var keyCode = e.keyCode == 0 ? e.charCode : e.keyCode; if ((keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 97 && keyCode <= 122)) { return true; } alert('Only number and letters'); return false; }
Body {Background:white}