如题!谢谢!已有的一段代码,判断是否为空;
<script language="javascript" type="text/javascript">
function check(){
if (shen.name.value ==""){
alert("公司名称不能为空!");
return false;
}
return true;
}
</script>
<script language="javascript" type="text/javascript">
function check(){
if (shen.name.value ==""){
alert("公司名称不能为空!");
return false;
}
return true;
}
</script>
{
var myDay = "2002-11-11";
var invalid = Date.parse(myDay);
return true;
}
catch(e)
{
return false;
}
---------------------
websharp, the simple and the best web technology. http://blog.csdn.net/coolmasoft
if (document.Login.t3.value.length==0 || document.Login.t3.value.replace(/\s/g,"")=="" || document.Login.t3.value.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/)==null)
{
alert("请正确填写您的日期(例如:1981-11-12)!");
document.Login.t3.focus();
return (false);
}