我如何獲得下拉rel =「30」值?jQuery獲取下拉rel值()
<select id="t_dermal_name">
<option value="1" rel="30">Between Eyebrows</option>
<option value="7" rel="30">Individual Line Softening</option>
<option value="2" rel="30">Lip Contouring</option>
</select>
的jQuery:
$("#t_dermal_name").change(onSelectChange);
function onSelectChange(){
var selected = $("#t_dermal_name option:selected");
var output = "";
if(selected.val() != 0){
output = selected.rel();
}
$("#output").html(output);
}
`selected.rel()`應該是`selected.attr( '相對' )` – 2011-01-06 18:09:00