jquery取checkbox选中的值
来源:互联网 发布:微信抓娃娃源码 编辑:程序博客网 时间:2024/05/01 02:29
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function go() {
var str="";
$("input[name='checkbox']:checkbox").each(function(){
if($(this).attr("checked")){
str += $(this).val()+","
}
})
//alert(str);
str.split(",");
alert(str[0]);
}
</script>
<body>
<div>
<input type="text" id="content" value="111"/>
<input type="checkbox" name="checkbox" value="1"/>
<input type="checkbox" name="checkbox" value="2"/>
<input type="checkbox" name="checkbox" value="3"/>
<input type="checkbox" name="checkbox" value="4"/>
<input type="checkbox" name="checkbox" value="5"/>
<input type="button" id="test" onclick="go();"/>
</div>
</body>
</html>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function go() {
var str="";
$("input[name='checkbox']:checkbox").each(function(){
if($(this).attr("checked")){
str += $(this).val()+","
}
})
//alert(str);
str.split(",");
alert(str[0]);
}
</script>
<body>
<div>
<input type="text" id="content" value="111"/>
<input type="checkbox" name="checkbox" value="1"/>
<input type="checkbox" name="checkbox" value="2"/>
<input type="checkbox" name="checkbox" value="3"/>
<input type="checkbox" name="checkbox" value="4"/>
<input type="checkbox" name="checkbox" value="5"/>
<input type="button" id="test" onclick="go();"/>
</div>
</body>
</html>
- jquery取选中的checkbox的值
- jquery取checkbox选中的值
- jquery的checkbox取值赋值选中
- jquery取checkbox选中的值
- jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中 (转别人的)
- jQuery操作CheckBox的方法(选中,取消,取值)详解
- jQuery操作CheckBox的方法(选中,取消,取值)详解
- jQuery操作CheckBox的方法(选中,取消,取值)
- jQuery操作CheckBox的方法(选中,取消,取值)详解
- jquery取得多选checkbox选中的值
- jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中
- 【jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中】
- jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中
- jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中
- jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中
- jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中
- jquery radio取值,checkbox取值,select取值,radio选中,checkbox选中
- jquery 选中checkbox的值
- Android for myself新增知识点总结(保持持续更新)
- [POJ 2185]Milking Grid[kmp]
- 全球15个顶级技术类博客
- hdu 4720 Naive and Silly Muggles(三角形外接圆)
- Linux系统在X86上的虚拟内存管理详解 (4)
- jquery取checkbox选中的值
- 关于HttpClient的总结
- 超级全的好电影!慢慢看!
- Gcc 优化选项注意事项
- 关于EditText的android:maxLength属性的注意事项
- 9、领域对象的三种状态
- 设计文档
- Eclipse4.3 swt 插件在线安装
- cmpp 短信去签名技术服务,欢迎前来洽谈合作