![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JQuery
黎明点支烟
成功的捷径就是不断积累自己犯的错!
展开
-
jquery 获得焦点的时候,焦点时文本框清空,失去焦点时又显示默认文字
$(document).ready(function() { //each遍历文本框 $(".input").each(function() { //保存当前文本框的值 var vdefault = this.value; $(this).focus(function() { //获得焦点时,如果值转载 2017-02-06 11:51:52 · 9238 阅读 · 0 评论 -
Struts学习_Jquery发送ajax请求以及datatype参数为text/JSON方式
Jquery发送ajax请求以及datatype参数为text/JSON方式1、方式一:datatype:'text'2、方式二:datatype:'JSON'3、使用gson-1.5.jar包和json-2.2.jar包处理JSON代码(注:使用json-2.2.jar包时,传给前端的结果,获取时不是json对象,需要var json = eval_r("("+data+")转载 2017-05-23 14:10:26 · 3116 阅读 · 0 评论 -
jquery 批量删除、全选、单选
// JavaScript Document $(document).ready(function() { // 全选 $("#allChk").click(function() { $("input[name='subChk']").prop("checked",this.checked); }); // 单选 var subChk = $("input[name='转载 2017-08-03 09:43:04 · 1180 阅读 · 0 评论 -
jquery 根据name属性值查找
$("div[id]") 选择所有含有id属性的div元素 $("input[name='keleyicom']") 选择所有的name属性等于'keleyicom'的input元素 $("input[name!='keleyicom']") 选择所有的name属性不等于'keleyicom'的input元素 $("input[name^='keleyi']") 选择所有的na转载 2017-08-21 10:23:46 · 422 阅读 · 0 评论 -
jquery checkbox 全选 反选 子级全选默认选中父级
js中:label>input type="checkbox" id="cb_all"/>全选label> label>input type="checkbox" class="cb_fruit"/>苹果label> label>input type="checkbox" class="cb_fruit"/>香蕉label> la原创 2017-08-31 15:06:20 · 3563 阅读 · 0 评论