jQuery ui插件的使用方法代碼實(shí)例
<script src="Jquery1.7.js" type="text/javascript"></script>
<script src="jquery.validate.js" type="text/javascript"></script>
<script src="messages_cn.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#form1').validate({
rules: {
txtUser: { required: true, minlength: 6 },
txtPassword: { required: true, minlength: 6 },
txtConfirm: { required: true, minlength: 6, equalTo: "#password" },
txtHomePage: { required: true, url: true },
txtBirthday: { required: true, dateISO: true },
txtXueYa: { required: true, digits: true },
txtEmail: { required: true, email: true }
},
errorshow: function (error, element) {
error.appendTo(element.siblings('span'));
}
})
})
</script>
</head>
<body>
<form action="" id="form1">
<table>
<tr>
<td>用戶名:</td>
<td><input name="txtUser" type="text" /><span>*</span> </td>
</tr>
<tr>
<td>密碼:</td>
<td><input name="txtPassword" id="password" type="text" /><span>*</span> </td>
</tr>
<tr>
<td>確認(rèn)密碼:</td>
<td><input name="txtConfirm" type="text" /><span>*</span> </td>
</tr>
<tr>
<td>主頁(yè):</td>
<td><input name="txtHomePage" type="text" /><span>*</span> </td>
</tr>
<tr>
<td>生日:</td>
<td><input name="txtBirthday" type="text" /><span>*</span> </td>
</tr>
<tr>
<td>血壓:</td>
<td><input name="txtXueYa" type="text" /><span>*</span> </td>
</tr>
<tr>
<td>郵箱:</td>
<td><input name="txtEmail" type="text" /><span>*</span> </td>
</tr>
</table>
</form>
</body>
</html>
相關(guān)文章
jQuery如何跳轉(zhuǎn)到另一個(gè)網(wǎng)頁(yè) 就這么簡(jiǎn)單
這篇文章主要介紹了如何在jQuery中跳轉(zhuǎn)到另外一個(gè)網(wǎng)頁(yè)HTML,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-12-12jQuery操作Select的Option上下移動(dòng)及移除添加等等
jQuery操作Select Option:向上移動(dòng)選中的option、向下移動(dòng)選中的option、移除選中的option、獲取所有的option值、添加option等等,下面有個(gè)不錯(cuò)的示例,感興趣的朋友不要錯(cuò)過(guò)2013-11-11JQuery的Validation插件中Remote驗(yàn)證的中文問(wèn)題
前段時(shí)間,再次出現(xiàn)AJAX中文編碼問(wèn)題,導(dǎo)致會(huì)員名重復(fù)檢測(cè)失敗,不過(guò)這次出現(xiàn)問(wèn)題的是Validation插件的remote驗(yàn)證。2010-07-07基于jQuery實(shí)現(xiàn)點(diǎn)擊同時(shí)更改兩個(gè)iframe的網(wǎng)址
最近寫了兩個(gè)管理后臺(tái)的前端頁(yè)面,其中有一個(gè)管理后臺(tái),左側(cè)菜單導(dǎo)航和右側(cè)內(nèi)容頁(yè)是兩個(gè)iframe,需求是,點(diǎn)擊上面的主導(dǎo)航時(shí),左側(cè)iframe和右側(cè)iframe調(diào)用不同的鏈接.2010-07-07jQuery dateRangePicker插件使用方法詳解
這篇文章主要為大家詳細(xì)介紹了jQuery dateRangePicker插件的使用方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-07-07jQuery Dialog 打開(kāi)時(shí)自動(dòng)聚焦的解決方法(兩種方法)
這篇文章主要介紹了jQuery Dialog 打開(kāi)時(shí)自動(dòng)聚焦的解決方法,及jquery dialog打開(kāi)時(shí),自動(dòng)聚焦在第一個(gè)控件上的方法,對(duì)jquery dialog相關(guān)知識(shí)感興趣的朋友通過(guò)本文一起學(xué)習(xí)吧2016-11-11