jquery的validation插件怎么在jsp中使用;然后代码如下:
代码如下错在哪里了?<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%><%Stringpat...
代码如下 错在哪里了?
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'add.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="jquery/jquery.validate.js"></script>
<body>
<form action="doadd.jsp"; id ="form1" name="form1">
<table>
<input type="hidden" name="action" value="save">
<tr>
<td>名字:</td>
<td><input id="name" type="text" name ="name"/></td>
</tr>
<tr>
<td>地址</td>
<td><input id="address" type="text" name ="address"/></td>
</tr>
<tr>
<td>邮箱</td>
<td><input id="email" type="text" name ="email"/></td>
</tr>
<tr>
<td>电话</td>
<td><input id="phone" type="text" name ="phone"/></td>
</tr>
</table>
<input id="Submit1" type="submit" value="提交" />
</form>
<script type="text/javascript">
$(document).ready(function() {
$('#form1').validate({
rules: {
name: {
required: true,
},
email: {
required: true,
email: true
},
address: {
required: true,
},
phone: {
required: true,
},
}, //end rules
messages: {
name: {
required: "请输入用户名.",
},
email: {
required: "请输入邮箱.",
email: "这不是一个正确的邮箱."
},
password: {
required: '请输入地址',
},
phone: {
required: '请输入联系电话',
},
},
}); // end validate
});
</script>
</body>
< html> 展开
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'add.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="jquery/jquery.validate.js"></script>
<body>
<form action="doadd.jsp"; id ="form1" name="form1">
<table>
<input type="hidden" name="action" value="save">
<tr>
<td>名字:</td>
<td><input id="name" type="text" name ="name"/></td>
</tr>
<tr>
<td>地址</td>
<td><input id="address" type="text" name ="address"/></td>
</tr>
<tr>
<td>邮箱</td>
<td><input id="email" type="text" name ="email"/></td>
</tr>
<tr>
<td>电话</td>
<td><input id="phone" type="text" name ="phone"/></td>
</tr>
</table>
<input id="Submit1" type="submit" value="提交" />
</form>
<script type="text/javascript">
$(document).ready(function() {
$('#form1').validate({
rules: {
name: {
required: true,
},
email: {
required: true,
email: true
},
address: {
required: true,
},
phone: {
required: true,
},
}, //end rules
messages: {
name: {
required: "请输入用户名.",
},
email: {
required: "请输入邮箱.",
email: "这不是一个正确的邮箱."
},
password: {
required: '请输入地址',
},
phone: {
required: '请输入联系电话',
},
},
}); // end validate
});
</script>
</body>
< html> 展开
2个回答
2011-07-23
展开全部
罗斯给的定义强调了营销的目的:营销是在一种利益之上下,通过相互交换和承诺,建立、维持、巩固与消费者及其他参与者的关系,实现各方的目的。反欺诈委托加盟是一个新的业务模式,表示加盟投资商委托一家公司帮着加盟策划,以达到规避加
2011-07-23
展开全部
庵的足迹已成传说。真正的京,到底在哪里?庵呢?那OROCHI空间毁天灭地的一战,到底换来了怎样一个结局? 点评:KOF99是SNK拳皇新的篇章。更新了KOF98的系统,增加了援护、CONTER模式等新要素。由于98已经将原来的路走到了极致
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询