<script language="javascript">
String.prototype.Trim = function()
{
return this.replace(/(^"s*)|("s*$)/g, "");
}
function Jude(form1){
if (form1.username.value.Trim()=="")
{
alert("请输入临时笔名!!!"n"n每喝一瓶农夫山泉为贫穷地区献去一分钱^@^(爱心广告)");
form1.username.focus();
return (false);
}
if (form1.email.value.Trim()=="")
{
alert("请输入邮箱地址!!!"n"n每喝一瓶农夫山泉为贫穷地区献去一分钱^@^(爱心广告)");
form1.email.focus();
return (false);
}
if (form1.nr.value.Trim()=="")
{
alert("请输入您的留言,留言不能为空!!!"n"n飘柔洗发水值得信耐(润发广告)^-^");
form1.nr.focus();
return (false);
}
if (form1.email.value.indexOf("'")!=-1)
{
alert("邮箱中不允许输入撇号!");
form1.email.focus();
return (false);
}
if (form1.email.value.indexOf("@")==-1)
{
alert("请输入正确的邮箱地址");
form1.email.focus();
return (false);
}
}
</script>