Jump to content

how to validate this


tauchai83

Recommended Posts

[code]
<script language="javascript" type="text/javascript">
var lastval=''
function numeric(obj,e){
if (!e) e=window.event

var a = document.getElementById('a')
if (obj.value.match(/^\d+$/g) || obj.value==''){
lastval=obj.value
}else{
obj.value=lastval
}
return false
}
</script>
<input type="text" onkeyup="numeric(this,event)" />
[/code]
Link to comment
https://forums.phpfreaks.com/topic/33743-how-to-validate-this/#findComment-158425
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.