ChinaUnix.net
相关讨论

jqueryselect操作 文章摘自:http://blog.sina.com.cn/s/blog_49cc672f0100cd28.html[code]//遍历option和添加、移除option function changeShipMethod(shipping){ var len = $("select[@name=ISHIPTYPE] option").length if(shipping.value != "CA"){ $("select[@name=ISHIPTYPE] option").each(function(){ if($(this).val() == 111){ $(this).remove(); } }); }else{ $("

jquery

by 听老歌 - Web开发 - 2011-11-15 15:15:43 阅读(1159) 回复(0)

jqueryselect操作 [转] [code] //遍历option和添加、移除option function changeShipMethod(shipping){ var len = $("select[@name=ISHIPTYPE] option").length if(shipping.value != "CA"){ $("select[@name=ISHIPTYPE] option").each(function(){ if($(this).val() == 111){ $(this).remove(); } }); }else{ $("").appendTo($("select[@name=ISHIPTYPE]")); } } ...

web

by feiyang10086 - Web开发 - 2011-08-14 13:17:54 阅读(1663) 回复(0)

[code]一 、select jquery获取select选择的Text和Value: 1. $("#select_id").change(function(){//code...}); //为select添加事件,当选择其中一项时触发 2. var checkText=$("#select_id").find("option:selected").text(); //获取select选择的Text 3. var checkValue=$("#select_id").val(); //获取select选择的Value 4. var checkIndex=$("#select_id ").get(0).selectedIndex; //获取select选择的索引值 5. var maxIndex...

by downup - Web开发 - 2011-04-20 00:20:29 阅读(1644) 回复(0)

[code]jquery获取select选择的Text和Value: 语法解释: 1. $("#select_id").change(function(){//code...}); //为select添加事件,当选择其中一项时触发 2. var checkText=$("#select_id").find("option:selected").text(); //获取select选择的Text 3. var checkValue=$("#select_id").val(); //获取select选择的Value 4. var checkIndex=$("#select_id ").get(0).selectedIndex; //获取select选择的索引值 5. var maxIndex=$...

by downup - Web开发 - 2011-02-14 15:02:26 阅读(2535) 回复(0)

jquery操作checkbox、radio Js代码[code]1.(引自 daysmileface的博客) 2. 3. 4. 5. 6. 7.例:将多个选中的checkbox的值组装成一个字符串 8. 9.