檢查Element By Class
//check class element is exist
if($('.className')[0]){
// it exists
}
else{
// it does not exist
}
檢查Element By Id
//check id element is exist
if($('#idName').length){
// it exists
}
else{
// it does not exist
}
//check class element is exist
if($('.className')[0]){
// it exists
}
else{
// it does not exist
}
//check id element is exist
if($('#idName').length){
// it exists
}
else{
// it does not exist
}
開始在上面輸入您的搜索詞,然後按回車進行搜索。按ESC取消。