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

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

使用了這種方法,不需要引入javascript腳本了吧

使用了這種方法,不需要引入javascript腳本了吧

正在回答

3 回答

沒(méi)腳本誰(shuí)來(lái)幫你執(zhí)行這些.... 這個(gè)肯定是要的,區(qū)別在于這里面處理了

http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js

自己去上面這個(gè)js文件里面找modal.js,里面有這一段js

$(document).on('click.bs.modal.data-api',?'[data-toggle="modal"]',?function?(e)?{
???var?$this???=?$(this)
???var?href????=?$this.attr('href')
???var?$target?=?$($this.attr('data-target')?||?(href?&&?href.replace(/.*(?=#[^\s]+$)/,?'')))?//?strip?for?ie7
???var?option??=?$target.data('bs.modal')???'toggle'?:?$.extend({?remote:?!/#/.test(href)?&&?href?},?$target.data(),?$this.data())

???if?($this.is('a'))?e.preventDefault()

???$target.one('show.bs.modal',?function?(showEvent)?{
?????if?(showEvent.isDefaultPrevented())?return?//?only?register?focus?restorer?if?modal?will?actually?get?shown
?????$target.one('hidden.bs.modal',?function?()?{
???????$this.is(':visible')?&&?$this.trigger('focus')
?????})
???})
???Plugin.call($target,?option,?this)
?})
function?Plugin(option,?_relatedTarget)?{
????return?this.each(function?()?{
??????var?$this???=?$(this)
??????var?data????=?$this.data('bs.modal')
??????var?options?=?$.extend({},?Modal.DEFAULTS,?$this.data(),?typeof?option?==?'object'?&&?option)

??????if?(!data)?$this.data('bs.modal',?(data?=?new?Modal(this,?options)))
??????if?(typeof?option?==?'string')?data[option](_relatedTarget)
??????else?if?(options.show)?data.show(_relatedTarget)?<-?這兒就是將事件注冊(cè)到target對(duì)象上
????})
??}


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

那為什么現(xiàn)在沒(méi)有給出js腳本代碼

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

?...當(dāng)然是需要的 ? 這個(gè)給出的方法大概意思就是給定一個(gè)規(guī)范 ? bootstrap中的js腳本是根據(jù)data-toggle 和 data-target的值來(lái)完成交互的

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

舉報(bào)

0/150
提交
取消

使用了這種方法,不需要引入javascript腳本了吧

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