JavaScript Validation Framework 运行时错误 配置文件读取错误,请检查这是怎么回事
xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE validation-config SYSTEM "validation-config.dtd">
<validation-config lang="auto">
<form id="form1" show-error="alert" show-type="all">
<field name="username" display-name="用户名" onfail="">
<depend name="required" />
<depend name="commonChar" />
</field>
<field name="password" display-name="密码">
<depend name="required" />
<depend name="commonChar" />
</field>
</form>
</validation-config>html文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>login.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head>
<body>
<script language="javascript" src="/shi/js/validation-framework.js"></script>
<form id="form1" name="form1" action="servlet/LoginServlet" method="post" onsubmit="return doValidate(this)">
name: <input type="text" name="name"/> <br>
password:<input type="password" name="password"/><br>
<input type="submit" name="submit"/>
</form>
</body>
</html>
xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE validation-config SYSTEM "validation-config.dtd">
<validation-config lang="auto">
<form id="form1" show-error="alert" show-type="all">
<field name="username" display-name="用户名" onfail="">
<depend name="required" />
<depend name="commonChar" />
</field>
<field name="password" display-name="密码">
<depend name="required" />
<depend name="commonChar" />
</field>
</form>
</validation-config>html文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>login.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head>
<body>
<script language="javascript" src="/shi/js/validation-framework.js"></script>
<form id="form1" name="form1" action="servlet/LoginServlet" method="post" onsubmit="return doValidate(this)">
name: <input type="text" name="name"/> <br>
password:<input type="password" name="password"/><br>
<input type="submit" name="submit"/>
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货