第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

怎么讓提示變位置讓他在下面顯示

怎么讓提示變位置讓他在下面顯示,

<!DOCTYPE html>

<html>

<head>

? ? <meta charset="UTF-8">

? ? <title>jQuery Validation 插件</title>

? ? <link rel="stylesheet" href="style.css"/>

</head>

<body>

<form id="demoForm">

? ? <fieldset>

? ? ? ? <legend>用戶登錄</legend>

? ? ? ? <p id="info"></p>


? ? ? ? <p>

? ? ? ? ? ? <label for="1username">用戶名</label>

? ? ? ? ? ? <input type="text" id="username" name="username"/>

? ? ? ? </p>

? ? ? ? </p>


? ? ? ? <p>

? ? ? ? ? ? <label for="1password">密碼</label>

? ? ? ? ? ? <input type="password" id="password" name="password"/>

? ? ? ? </p>

? ? ? ? </p>


? ? ? ? <p>

? ? ? ? ? ? <label for="1confirm-password">確認(rèn)密碼</label>

? ? ? ? ? ? <input type="password" id="confirm-password" name="confirm-password"/>

? ? ? ? </p>

? ? ? ? </p>


? ? ? ? <p>

? ? ? ? ? ? <input type="submit" value="登錄"/>

? ? ? ? </p>

? ? </fieldset>

</form>


<script src="vendor/jquery-1.10.0.js"></script>

<script src="vendor/jquery.validate-1.13.1.js"></script>

<script>

? ? var validator1;

? ? $(document).ready(function () {

? ? ? ? validator1 = $("#demoForm").validate({

? ? ? ? ? ? debug: true,

? ? ? ? ? ? rules: {

? ? ? ? ? ? ? ? username: {

? ? ? ? ? ? ? ? ? ? required: true,

? ? ? ? ? ? ? ? ? ? minlength: 2,

? ? ? ? ? ? ? ? ? ? maxlength: 10

? ? ? ? ? ? ? ? },

? ? ? ? ? ? ? ? password: {

? ? ? ? ? ? ? ? ? ? required: true,

? ? ? ? ? ? ? ? ? ? minlength: 2,

? ? ? ? ? ? ? ? ? ? maxlength: 16

? ? ? ? ? ? ? ? },

? ? ? ? ? ? ? ? "confirm-password": {

? ? ? ? ? ? ? ? ? ? equalTo: "#password"

? ? ? ? ? ? ? ? }

? ? ? ? ? ? },

? ? ? ? ? ? messages: {

? ? ? ? ? ? ? ? username: {

? ? ? ? ? ? ? ? ? ? required: '請(qǐng)輸入用戶名',

? ? ? ? ? ? ? ? ? ? minlength: '用戶名不能小于2個(gè)字符',

? ? ? ? ? ? ? ? ? ? maxlength: '用戶名不能超過(guò)10個(gè)字符',

? ? ? ? ? ? ? ? ? ? remote: '用戶名不存在'

? ? ? ? ? ? ? ? },

? ? ? ? ? ? ? ? password: {

? ? ? ? ? ? ? ? ? ? required: '請(qǐng)輸入密碼',

? ? ? ? ? ? ? ? ? ? minlength: '密碼不能小于2個(gè)字符',

? ? ? ? ? ? ? ? ? ? maxlength: '密碼不能超過(guò)16個(gè)字符'

? ? ? ? ? ? ? ? },

? ? ? ? ? ? ? ? "confirm-password": {

? ? ? ? ? ? ? ? ? ? equalTo: "兩次輸入密碼不一致"

? ? ? ? ? ? ? ? }


? ? ? ? ? ? },


? ? ? ? ? ? highlight: function(element, errorClass, validClass) {

? ? ? ? ? ? ? ? $(element).addClass(errorClass).removeClass(validClass);

? ? ? ? ? ? ? ? $(element).fadeOut().fadeIn();

? ? ? ? ? ? },

? ? ? ? ? ? unhighlight: function(element, errorClass, validClass) {

? ? ? ? ? ? ? ? $(element).removeClass(errorClass).addClass(validClass);

? ? ? ? ? ? },

? ? ? ? ? ? submitHandler: function (form) {

? ? ? ? ? ? ? ? console.log($(form).serialize())

? ? ? ? ? ? }

? ? ? ? });


? ? ? ? $("#check").click(function () {

? ? ? ? ? ? console.log($("#demoForm").valid() ? "填寫正確" : "填寫不正確");

? ? ? ? });

? ? });

</script>


</body>

</html>


正在回答

2 回答

通過(guò)查詢可以得知提示內(nèi)容所在區(qū)域的元素是一個(gè)class為error的label元素,直接通過(guò)選擇器獲取,調(diào)節(jié)樣式就可以了。

0 回復(fù) 有任何疑惑可以回復(fù)我~

不知道我聽蒙了

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕后端3081372 提問(wèn)者

求個(gè)人棒解答一下
2016-07-29 回復(fù) 有任何疑惑可以回復(fù)我~
#2

GiveMeGeek 回復(fù) 慕后端3081372 提問(wèn)者

errorPlacement通過(guò)這個(gè)屬性來(lái)設(shè)置顯示錯(cuò)誤信息的位置。
2016-09-22 回復(fù) 有任何疑惑可以回復(fù)我~
#3

慕后端3081372 提問(wèn)者 回復(fù) GiveMeGeek

你好,這個(gè)是css還是jq
2016-09-23 回復(fù) 有任何疑惑可以回復(fù)我~
#4

GiveMeGeek 回復(fù) 慕后端3081372 提問(wèn)者

這是Validate封裝好了的,不需要考慮的那么深入
2016-09-26 回復(fù) 有任何疑惑可以回復(fù)我~
#5

慕后端3081372 提問(wèn)者

改變樣式的話還是要在css里面改吧。?;貜?fù) GiveMeGeek:
2016-09-26 回復(fù) 有任何疑惑可以回復(fù)我~
查看2條回復(fù)

舉報(bào)

0/150
提交
取消

怎么讓提示變位置讓他在下面顯示

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)