
<asp:HiddenField ID="email_value" OnChanged="mail()" runat="server" />怎么在cs获得函数的bool类型值
functionmail(){varem=myform.email.value;varpattern=/^[\da-zA-Z]+(_|)[\da-zA-Z]+@[\da-...
function mail() {
var em = myform.email.value;
var pattern = /^[\da-zA-Z]+(_|)[\da-zA-Z]+@[\da-zA-Z]+.[a-z]+$/;
flag = pattern.test(em);
if (flag) {
document.write("输入的电子邮件格式不正确!");
email.ForeColor = System.Drawing.Color.Red;
return false;
}
else
return true;
}
后台报错
bool v = Request.Form["email_value.OnChange"];
刚刚学网页,做大作业,拜托详细一点~ 展开
var em = myform.email.value;
var pattern = /^[\da-zA-Z]+(_|)[\da-zA-Z]+@[\da-zA-Z]+.[a-z]+$/;
flag = pattern.test(em);
if (flag) {
document.write("输入的电子邮件格式不正确!");
email.ForeColor = System.Drawing.Color.Red;
return false;
}
else
return true;
}
后台报错
bool v = Request.Form["email_value.OnChange"];
刚刚学网页,做大作业,拜托详细一点~ 展开
2016-06-23
展开全部
首先,JS赋值跟runat="server"不起冲突的,你完全可以用个并用JS赋值..其次,不加runat="server"的话,后台就用Request对象的Forms或者QueryStrings集合来获取
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询