摘要: 该问题主要产生在ie8下对tr标签隐藏后统计其个数时出现下面是一段官方的解释:There is an open ticket for this. It is interesting because IE says that the TR element still has a width > 0 even though it isn't displayed. If you check the TD of the hidden TR, it is hidden.解决方法,通过行的css样式获取display值来判断当前行是否是隐藏状态详细代码如下:Js代码varhideCount= 阅读全文
posted @ 2011-07-16 12:10 半日闲 阅读(708) 评论(0) 推荐(0) 编辑
摘要: 阻止提交按钮的默认 action使用 preventDefault() 函数来阻止对表单的提交。参考:http://www.w3school.com.cn/jquery/event_submit.asp 阅读全文
posted @ 2011-07-16 10:46 半日闲 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1.用js/jquery在提交前去掉disabled$("form").submit(function){ $("input").each(function(){ $(this).removeAttr("disabled"); });});2.使用readonly:checkbox不支持,注意有几个不支持的3.使用hidden,隐藏传送 阅读全文
posted @ 2011-07-16 10:44 半日闲 阅读(823) 评论(0) 推荐(0) 编辑
摘要: functiongetCheckboxValue(){ //注意ie8和高版本的firefox不支持jquery对checked的选择器 //vars=$('input[type="checkbox"][name="xxx"][checked]');是获取不到选定的元素 //需要用下面的方法获取选中节点 vars=$('input[type="checkbox"][name="xxx"]');$.each(s,function(i,n){ if(n.checked){ alert(n 阅读全文
posted @ 2011-07-16 10:39 半日闲 阅读(789) 评论(0) 推荐(1) 编辑