<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function check(){
var myt=document.getElementById("yb");
if(Number(myt.value)==0 || !(Number(myt.value)%100==0)){
myt.value="";
};
}
</script>
</head><body>
<input id="yb" type="text" onchange="check()" />
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function check(){
var myt=document.getElementById("yb");
if(Number(myt.value)==0 || !(Number(myt.value)%100==0)){
myt.value="";
};
}
</script>
</head><body>
<input id="yb" type="text" onchange="check()" />
</body>
</html>
function CheckNumber(obj)
{
if (Number(obj.value) % 100 == 0)
return true;
alert("error");
obj.select();
obj.focus();
return false;
}
</script>
<input type="text" onChange="javascript:return CheckNumber(this);">
if(/^(?:[1-9])(?:[0-9]*)00$/g.test('10')==true){
alert('合法');
}else{
alert('非法');
}
alert('合法');
}else{
alert('非法');
}
inputstr = "你输入的内容";
if(re.test(inputstr))
{
//合法
}
else
{
//不合法
}
if(/^\d+00$/.test(inputstr))
{
//合法;
}
else
{
//不合法
}