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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

為什么 Bootstrap 的 js 源碼不寫(xiě)分號(hào)?

為什么 Bootstrap 的 js 源碼不寫(xiě)分號(hào)?

胡子哥哥 2019-04-08 11:18:02
看了很多Bootstrap源碼,發(fā)現(xiàn)每句話(huà)都不加分號(hào),這樣寫(xiě)有什么特殊意義么?隨便貼一段:Tab.prototype.show=function(){var$this=this.elementvar$ul=$this.closest('ul:not(.dropdown-menu)')varselector=$this.attr('data-target')if(!selector){selector=$this.attr('href')selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')//stripforie7}if($this.parent('li').hasClass('active'))returnvarprevious=$ul.find('.active:lasta')[0]vare=$.Event('show.bs.tab',{relatedTarget:previous})$this.trigger(e)if(e.isDefaultPrevented())returnvar$target=$(selector)this.activate($this.parent('li'),$ul)this.activate($target,$target.parent(),function(){$this.trigger({type:'shown.bs.tab',relatedTarget:previous})})}
查看完整描述

2 回答

?
千巷貓影

TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超7個(gè)贊

JavaScript不加分號(hào),瀏覽器也能正常執(zhí)行的。(不過(guò)一般而言壓縮的時(shí)候會(huì)自動(dòng)加分號(hào)的。例如googleclosure和uglify.js都能自動(dòng)加分號(hào)。)
縮進(jìn)良好,可讀性也不差。
當(dāng)然邊邊角角可能會(huì)有些小問(wèn)題,留心一下即可。
                            
查看完整回答
反對(duì) 回復(fù) 2019-04-08
  • 2 回答
  • 0 關(guān)注
  • 440 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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