1function isNumber(evt) {
2 evt = (evt) ? evt : window.event;
3 var charCode = (evt.which) ? evt.which : evt.keyCode;
4 if (charCode > 31 && (charCode < 48 || charCode > 57)) {
5 return false;
6 }
7 return true;
8}
9
1<input type="text" class="textfield" value="" id="extra7" name="extra7" onkeypress="return isNumber(event)" />
2