为什么这个不执行?

来源:百度知道 编辑:UC知道 时间:2024/05/15 19:53:18
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script LANGUAGE="javascript">
<!--
function userReg_onsubmit() {
if(document.userReg.Username.value=="") {
alert("请输入姓名!")
document.userReg.Username.focus()
return false
}else{
return true
}
}
//-->
</script>

</head>

<body>

<form method=post name=userReg LANGUAGE=javascript onsubmit=return userReg_onsubmit()>
<p><span ><font color="#FF0000">*</font> </span><strong>姓名</strong>  <input type=text name=Username class=smallInput maxlength=8 />
</p>
<div align="center"><center>
<p><input type="submit&

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script LANGUAGE="javascript">
<!--
function userReg_onsubmit() {
if(document.userReg.Username.value=="") {
alert("请输入姓名!")
document.userReg.Username.focus()
return false
}else{
return true
}
}
//-->
</script>

</head>

<body>

<form method="post" name="userReg" onsubmit="return userReg_onsubmit()">
<p><span ><font color="#FF0000">*</font> </span><strong>姓名</strong>
<input type=text name=Username class=smallInput maxlength=8 />
</p>
<div align="center"><center>
<p><input type="su