1
<optgroup label="Food">
选择OPTGROUP我该怎么办,所以当你按下这个链接上点击jQuery中
<a class='clickMe' id='Food'>Show </a>
应该在optgroup
选择第一个<option>
,具有OPTGROUP标签“食品”(取从链接中的 'id' 属性)
$('.clickMe').live('click', function(){
var label = $(this).attr('id');
// How can i select the first option from the optgroup label here?
});
也许,如果有帮助,选择具有名称= “产品[] [类别]”
没有工作了要么 – Karem
这里有一个工作的例子 - http://jsfiddle.net/pR8qF/ – ipr101
为什么犯规“德系车”的工作,如果我输入的是,在拉贝=? – Karem