jquery下拉列表选中项改变时获取新选项的属性值
1 $("#textSel").change(funtion(){ 2 var selVal=$(this).val(); 3 var selText=$("#textSel option:selected").text(); 4 var otherAttr=$("#textSel option:selected").attr("..."); 5 });
1 $("#textSel").change(funtion(){ 2 var selVal=$(this).val(); 3 var selText=$("#textSel option:selected").text(); 4 var otherAttr=$("#textSel option:selected").attr("..."); 5 });