1 2 jQuery(function($){ 3 //全选 4 $("#btn1").click(function(){ 5 $("input[name='checkbox']").attr("checked","true"); 6 }) 7 //取消全选 8 $("#btn2").click.....
分类:
Web程序 时间:
2014-09-02 00:10:53
阅读次数:
323
DescriptionJessica's a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on ...
分类:
其他好文 时间:
2014-09-01 22:34:03
阅读次数:
294
如果你在迭代里有一个条件,而这个条件需要查数据表来获得结果。那么请添加一个方法,比如:def checked?
分类:
其他好文 时间:
2014-09-01 21:00:33
阅读次数:
190
$("#login-showpassword").click(function(){ //$(this).attr("checked") 这个返回undefined //this.checked; 返回true if($(this).is(":checked")) { $("#text-p...
分类:
Web程序 时间:
2014-09-01 12:32:33
阅读次数:
197
function check(){
var xz=document.getElementById("xz");
alert(xz.checked);
}...
分类:
Web程序 时间:
2014-08-29 09:28:17
阅读次数:
207
今天碰到了兼容性问题,页面显示空白,打开调试界面,显示信息 “Compatibility View because 'Display intranet sites in Compatibility View' is checked”,最终在msdn找到一句代码解决了
分类:
Web程序 时间:
2014-08-28 19:28:35
阅读次数:
697
获取一组radio被选中项的值
var item = $('input[@name=items][@checked]').val();
获取select被选中项的文本
var item = $("select[@name=items] option[@selected]").text();
select下拉框的第二个元素为当前选中值
$('#select_id')[0].sele...
分类:
Web程序 时间:
2014-08-28 17:01:10
阅读次数:
268
比如现在一个checkbox是checked的,此时全局变量i = 2;在checkbox的click事件发生时绑定一个函数function bind(e){ var target = e.target; var isChecked = target.checked; //fal...
分类:
其他好文 时间:
2014-08-27 18:06:58
阅读次数:
244
Description
The math department has been having problems lately. Due to immense amount of unsolicited automated programs which were crawling across their pages, they decided to put Yet-Another-Publ...
分类:
其他好文 时间:
2014-08-27 16:37:08
阅读次数:
220
function jqchk(){? //jquery获取复选框值? ? var s=‘‘;? ? $(‘input[name="aihao"]:checked‘).each(function(){? ??? s+=$(this).val()+‘,‘;? ? });? 点击“提交”后,可以得到正确的选择值了,但是...
分类:
Web程序 时间:
2014-08-27 13:12:48
阅读次数:
275