随笔分类 -  jquery

jQuery prop方法替代attr方法
摘要:jquery attr()方法获取标签的 checked 会有问题,所以用了 prop() 方法。 阅读全文

posted @ 2019-02-22 10:01 dongruiha 阅读(616) 评论(0) 推荐(0) 编辑

jquery ajax超时设置
摘要:var ajaxTimeoutTest = $.ajax({ url:'', //请求的URL timeout : 1000, //超时时间设置,单位毫秒 type : 'get', //请求方式,get或post data :{}, //请求所传参数,json格式 dataType:'json', 阅读全文

posted @ 2017-06-30 13:53 dongruiha 阅读(206) 评论(0) 推荐(0) 编辑

使用jquery 动态创建form 并提交
摘要:$(document).ready(function(){ $("a.delete").click(function(event){ action = this.getAttribute("action") form = $("<form></form>") form.attr('action',a 阅读全文

posted @ 2017-05-07 06:01 dongruiha 阅读(11521) 评论(0) 推荐(1) 编辑

导航