aa = []
$('div :checked').each(function() {
aa.push($(this).attr('name') + '(' + $(this).attr('type') + '):' + $(this).parent().text());
}); //取全部已选中值
alert(aa);这个是取全部的DIV下的input,我而要判断当div下style="display:block"才去取被选中的
$('div :checked').each(function() {
aa.push($(this).attr('name') + '(' + $(this).attr('type') + '):' + $(this).parent().text());
}); //取全部已选中值
alert(aa);这个是取全部的DIV下的input,我而要判断当div下style="display:block"才去取被选中的
解决方案 »
- 响应onblur检验表单后alert("xxx")为什么在360浏览器下关不掉提示窗?
- 如何获取事件对象
- js实现拖动div但效果很卡
- 我的facebook和msn都被别人盗用了。。
- options怎么用循环赋值,想让他为空
- 如何用open()方法打开两个子窗口?
- 新来小弟,求身份证验证问题!
- 如何实现网页中嵌入的realplay(或media player)在进行视频播放时根据播放的帧数产生网页的动态改变???
- VBscript中转换Ascll码的函数有chr(),asc(),JavaScript中有吗?
- 各为高手,着该如何是好????超急,老板在身后!!
- 一段高端的js代码
- js用addEventListener添加点击问题
<div style="display:none"></div>
<div style="display:none"></div>
<div style="display:block"></div>
<div style="display:none"></div>
<button class="btn1" id="button">下一个</div>这个JQ代码没问题,只不过是他把我所有DIV下的INPUT值全取出来了。我想当我点下一个时取<div style="display:block"></div>的值aa = []
$('div :checked').each(function() {
aa.push($(this).attr('name') + '(' + $(this).attr('type') + '):' + $(this).parent().text());
}); //取全部已选中值
alert(aa);