this.btnUpdate.Attributes.Add("onclick", "return checkdate();");
解决方案 »
- 我想在网站的首页弄个繁简转换的功能,怎么搞呀~~
- asp.net 网站发布到iis,验证码图片为什么显示不出来.................................新手求解
- winner2050 wuyq11 补分
- .Net 如何调用java的API
- 求ASP.NET中使用扫描仪的方案,有没有现成的控件?在线等!!!!
- 配置 Microsoft .NET Framework 2.0
- 怎么asp.net自动生成<?xml version="1.0" encoding="utf-8"?>
- 出现了一个前所未有的错误 没见过额 高人指教3Q
- 天气真热,散点分凉快凉快,顺便认识认识新朋友
- 操作必须使用一个可更新的查询。
- 请介绍几本关于存储结构,触发器的书籍
- 怎样使button无效
----------------------------------------------------------------------------------是不是丢submit了
function isDigit()
{
var patrn=/^[0-9]{1,20}$/;
var strvalue = document.getElementById("txtTemperature").value;
var diagnoseDesc = form1.txtDiagnoseDesc.value;
if(diagnoseDesc.length==0||diagnoseDesc =="")
{
alert('请录入病例备注!');
document.form1.txtDiagnoseDesc.focus();
return false;
}
if(strvalue.length==0||strvalue =="")
{
alert('请录入病人体温!');
document.form1.txtTemperature.focus();
return false;
}
if(!patrn.test(strvalue))
{
alert("对不起,您的输入有误,请注意温度为数字!");
document.form1.txtTemperature.value="";
document.form1.txtTemperature.focus();
return false;
}
else
{
return true;
}
} <input id="btnGo" runat="server" onclick="return isDigit();" type="button" value="下一步" onserverclick="btnGo_ServerClick" />
{
var patrn=/^[0-9]{1,20}$/;
var strvalue = document.getElementById("txtTemperature").value;
var diagnoseDesc = form1.txtDiagnoseDesc.value;
if(diagnoseDesc.length==0||diagnoseDesc =="")
{
alert('请录入病例备注!');
document.form1.txtDiagnoseDesc.focus();
return false;
}
if(strvalue.length==0||strvalue =="")
{
alert('请录入病人体温!');
document.form1.txtTemperature.focus();
return false;
}
if(!patrn.test(strvalue))
{
alert("对不起,您的输入有误,请注意温度为数字!");
document.form1.txtTemperature.value="";
document.form1.txtTemperature.focus();
return false;
}return true;
-----------------------
去掉最后1个else{},把return true;拿出来
用vs2005新建一个默认的asp.net网站却无法运行!
调试后弹出对话框无法启动程序”c:\PROGRA~1\INTERN~1\1.EXE”。系统找不到指定的文件?
自己在该目录下建了一个1.exe也不行。
急啊,没有人教,哪位前辈知道?
var strvalue = document.getElementById("txtTemperature").value;如果txtTemperature是服务器端ID的话,你这样是取不到的。