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

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

如何確定一個(gè)按鈕關(guān)閉哪一個(gè)警告框呢??用JS來(lái)觸發(fā)的話

如何確定一個(gè)按鈕關(guān)閉哪一個(gè)警告框呢??用JS來(lái)觸發(fā)的話,給按鈕綁定了事件,卻沒(méi)有綁定哪一個(gè)警告框。。。。

正在回答

3 回答

<div?class="alert?alert-warning"?role="alert"?id="myAlert">
????<h4>謹(jǐn)防被騙</h4>
????<p>請(qǐng)確認(rèn)您轉(zhuǎn)賬的信息是你的親朋好友,不要輕意相信不認(rèn)識(shí)的人...</p>
????<button?type="button"??class="btnbtn-danger"?id="close">關(guān)閉</button>
</div>
<div?class="alert?alert-warning"?role="alert"?id="myAlert1">
????<h4>謹(jǐn)防被騙</h4>
????<p>1請(qǐng)確認(rèn)您轉(zhuǎn)賬的信息是你的親朋好友,不要輕意相信不認(rèn)識(shí)的人...</p>
????<button?type="button"??class="btnbtn-danger"?id="close1">關(guān)閉</button>
</div>
??<script?src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
??<script?src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
??<script>
?????$(function(){
????????????$("#close").on("click",function(){
????????????????$(this).alert("close");
????????????});
????????????$("#close1").on("click",function(){
????????????????$(this).alert("close");
????????????});
??????????});
??</script>
0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

null__ 提問(wèn)者

非常感謝!
2016-06-01 回復(fù) 有任何疑惑可以回復(fù)我~

并沒(méi)有用。。。

<body>

<div class="alert alert-warning" role="alert" id="myAlert1">

? ? <h4>謹(jǐn)防被騙</h4>

? ? <p>請(qǐng)...</p>

? ? <button type="button" ?class="btn btn-danger" id="close1">關(guān)閉</button>

</div>

? ? <div class="alert alert-warning" role="alert" id="myAlert2">

? ? <h4>謹(jǐn)防被騙</h4>

? ? <p>請(qǐng)...</p>

? ? <button type="button" ?class="btn btn-danger" id="close2">關(guān)閉</button>

</div> ?

? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>

? <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

? <script>

? ? $(function(){

? ? ? ? $("#close1").on("click",function(){

? ? ? ? ? ? $(this).alert("close"); ?

? ? ? ? }); ? ? ??

? ? ? ? $("#close2").on("click",function(){

? ? ? ? ? ? $(this).alert("close"); ?

? ? ? ? });?

});

? </script>

點(diǎn)擊兩個(gè)按鈕都是關(guān)閉第二個(gè)警告框。。。


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

陳微語(yǔ)

這樣寫是對(duì)的,你把兩個(gè)警告框的內(nèi)容弄成不一樣的先吧
2016-04-25 回復(fù) 有任何疑惑可以回復(fù)我~
#2

西風(fēng)瀟瀟

有用的,因?yàn)槟愕?個(gè)警告框內(nèi)容是一模一樣的,所以點(diǎn)擊的時(shí)候會(huì)造成視覺上的錯(cuò)覺,認(rèn)為關(guān)閉的是同一個(gè)按鈕,其實(shí)關(guān)閉的是不同的。 隨便修改下某一個(gè)警告框的內(nèi)容,就可以發(fā)現(xiàn)。
2016-06-11 回復(fù) 有任何疑惑可以回復(fù)我~
#3

null__ 提問(wèn)者 回復(fù) 西風(fēng)瀟瀟

666,是的,謝謝了!
2016-06-13 回復(fù) 有任何疑惑可以回復(fù)我~

在警告框中加入關(guān)閉按鈕

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

null__ 提問(wèn)者

不知道為啥回復(fù)不了你,不過(guò)我寫在了問(wèn)題下面。。。
2016-02-14 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

如何確定一個(gè)按鈕關(guān)閉哪一個(gè)警告框呢??用JS來(lái)觸發(fā)的話

我要回答 關(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)