这个关于表单验证的javascript代码错误在哪里?

来源:百度知道 编辑:UC知道 时间:2024/05/18 13:13:20
请看看错误在哪里,就是不执行这段javascript

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册</title>
</head>
<body>
<div align="center"><h1>注册,填写以下资料并记得及时更新。</h1></div>
<Script language="JavaScript">Function VerifyInput()
{

username = document.myform.username.value;
If (username == "")
{
alert("用户名不能为空!");
document.myform.username.focus();
return fa

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册</title>
<Script language="JavaScript">
function VerifyInput() {
username = document.all.username.value;
//alert(username)
if (username == "")
{
alert("用户名不能为空!");
document.all.username.focus();
return false;
}

password = document.all.password.value;

if (password == "")
{
alert("请填写密码!"); <