表单正则表达式
<script>
function strIsNull(str)
{
var patrn=/[a|b|c]/;
if (!patrn.exec(str)) return false
return true
}
function cheack(form){
if(strIsNull(form.name.value))
{
alert("aaaaaaaaaaaa");
return false;
}
else
{
alert("111111111111");
return true;
}
}
</script>
<form id="form" name="form" method="post" action="" onsubmit="return cheack(this);">
<input type="text" name="name" />
<input type="submit" name="Submit" value="提交" />
</form>