我有一个选择菜单,我试图绑定一个单击函数,并能够在更改时重新获取选择选项值属性。
select = $('#select_networks').selectmenu();
//bind the change of network/group
select.bind( "change", function(event, ui) {
//need to figure out the selected elements value attribute
});
看看这个:
$("#select_networks").bind("change", function() {
alert($(this).val());
});
UPDATE
$("#select_networks").bind("change", function() {
var typeVal = $(this).children("*[value=" + $(this).val() + "]").attr("type");
alert(typeVal);
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)