📜  jquery if else on click - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:00.853000             🧑  作者: Mango

代码示例1
$('#myElementID').click(function() {
    var isSomethingTrue = true;
    
    if(isSomethingTrue){
        alert("something is true");
    }else{
        alert("something is false");
    }
});