方法1:functionjudgeShowOrHide(){
alert($("#id").is(':visible'));//判斷是否顯示??顯示:true?隱藏:false
if($("#id").is(':hidden')){
alert("隱藏了");
//執(zhí)行語句
}else{
alert("顯示");
//執(zhí)行語句
}
}
方法2:
if( document.getElementById("div").css("display")==='none')
if( document.getElementById("div").css("display")==='block')