課程
/前端開(kāi)發(fā)
/jQuery
/jQuery基礎(chǔ)(三)—事件篇
原生JS實(shí)現(xiàn)例三 求大神解答
2017-01-15
源自:jQuery基礎(chǔ)(三)—事件篇 2-3
正在回答
var x = 1;
if(x == "1") {
? ? console.log("YAY! They're equal!");
}
// 嚴(yán)格平等,類(lèi)型必須相同
if(x === "1") {
? ? console.log("Sadly, I'll never write this to the console");
if(x === 1) {
? ? console.log("YES! Strict Equality FTW.")
var doSomething = function(doWhat) {
? ? switch(doWhat) {
? ?? ???case "doThisThing":
? ?? ?? ?? ?// more code...
? ?? ???break;
? ?? ???case "doThatThing":
? ?? ???case "doThisOtherThing":
? ?? ?? ?? ?// more code....
? ?? ???// additional cases here, etc.
? ?? ???default:
? ?? ?? ?? ?// default behavior
? ? }
舉報(bào)
jQuery第三階段開(kāi)啟事件修煉,掌握對(duì)頁(yè)面進(jìn)行交互的操作
3 回答求大神解答,有什么區(qū)別嗎
2 回答求大神解答:本節(jié)mouseover事件的測(cè)試一
2 回答求問(wèn)大神如何實(shí)現(xiàn)點(diǎn)擊切換效果
1 回答求大神請(qǐng)教
3 回答關(guān)于方法三的小小疑問(wèn),求解答
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-01-16
var x = 1;
if(x == "1") {
? ? console.log("YAY! They're equal!");
}
var x = 1;
// 嚴(yán)格平等,類(lèi)型必須相同
if(x === "1") {
? ? console.log("Sadly, I'll never write this to the console");
}
if(x === 1) {
? ? console.log("YES! Strict Equality FTW.")
}
var doSomething = function(doWhat) {
? ? switch(doWhat) {
? ?? ???case "doThisThing":
? ?? ?? ?? ?// more code...
? ?? ???break;
? ?? ???case "doThatThing":
? ?? ?? ?? ?// more code...
? ?? ???break;
? ?? ???case "doThisOtherThing":
? ?? ?? ?? ?// more code....
? ?? ???break;
? ?? ???// additional cases here, etc.
? ?? ???default:
? ?? ?? ?? ?// default behavior
? ?? ???break;
? ? }
}