2012年3月10日
摘要: 例:将多个选中的checkbox的值组装成一个字符串<scripttype=text/javascript>functionaddMem(){//varfollowers=document.getElementsByName("followers");varf_str='0';$("input[@name='followers']").each(function(){if($(this).attr("checked")==true){f_str+=","+$(this). 阅读全文
posted @ 2012-03-10 19:35 QZB.NET 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2012-03-10 19:34 QZB.NET 阅读(152) 评论(0) 推荐(0) 编辑