怎么JS验证不了

来源:百度知道 编辑:UC知道 时间:2024/05/21 10:54:38
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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=utf-8" />
<title>找回密码</title>
<script language="javascript">
function showpwd()
{
if (document.showpwd.username.value.length == 0)
{
alert("请输入要查找密码的用户名!");
document.showpwd.username.focus();
return false;
}
if (document.showpwd.question.value.length ==0 )
{
alert

你的表单名和JS定义的函数名好像和JS内部什么东西起了冲突
改了就可以了

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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 cc()
{

if (document.form1.username.value.length==0)
{
alert("请输入要查找密码的用户名!");
document.form1.username.focus();
return false;
}
if (document.form1.q