摘要:
例:将多个选中的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). 阅读全文
摘要:
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 阅读全文