0
什麼select#category
指的是哪一個是元素ID? 你也可以解釋一下這個select option:selected
?什麼'select#category'refter to?
$("select#category").change(function()
{
if ($("select option:selected").val() == 0) {
$('div[id^="product_"]').hide();
$('#waiting').show();
}
$('#waiting').hide();
$('div[id^="product_"]').hide();
if ($('div[id="product_'+$("select option:selected").val()+'"]:visible'))
{
$('div[id="product_'+$("select option:selected").val()+'"]').show();
}
}
});
因此,如果「ID」參與,爲什麼它也讓選擇關鍵字呢?(因爲我覺得沒有選擇部分,它仍然是唯一的,指的是特定的元素)
因此,如果「ID」參與它爲什麼也把選擇的關鍵字有(因爲我?認爲沒有選擇部分,它仍然是唯一的) –
@SafeTobe根本不需要'select' –