<script>
function Juge(theForm)
{
if (theForm.txtemail.value == "")
{
alert("请输入电子信箱!");
theForm.txtemail.focus();
return (false);
}
else{
var temp = document.getElementById("txtemail");
//对电子邮件的验证
var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
function Juge(theForm)
{
if (theForm.txtemail.value == "")
{
alert("请输入电子信箱!");
theForm.txtemail.focus();
return (false);
}
else{
var temp = document.getElementById("txtemail");
//对电子邮件的验证
var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if(!myreg.test(temp.value)){
alert('提示:请输入有效的E_mail!');
return (false);
txtemail.focus();
alert('提示:请输入有效的E_mail!');
return (false);
txtemail.focus();
}
}
if (theForm.txtcontent.value == "")
{
alert("请您输入您的留言内容");
theForm.txtcontent.focus();
return (false);
}
if (theForm.txtcode.value == "")
{
alert("请输入验证码");
theForm.txtcode.focus();
return (false);
}
}
</script>
if (theForm.txtcontent.value == "")
{
alert("请您输入您的留言内容");
theForm.txtcontent.focus();
return (false);
}
if (theForm.txtcode.value == "")
{
alert("请输入验证码");
theForm.txtcode.focus();
return (false);
}
}
</script>