文章分类 -  jQuery

jquery异步编程
摘要:jQuery 也引入了 Promise 的概念。 Promise 是一种令代码异步行为更加优雅的抽象,有了它,我们就可以像写同步代码一样去写异步代码。 阅读全文
posted @ 2016-04-06 17:14 苏荷酒吧 阅读(96) 评论(0) 推荐(0)
jQuery选择器
摘要:// 表单背景色$("table tr:even").css("background", "#eee");// 多选按钮$("table").find("input[id=chkAll]").click(function(){if (this.checked){$("table").find("in... 阅读全文
posted @ 2014-07-23 14:35 苏荷酒吧 阅读(93) 评论(0) 推荐(0)
jQuery学习笔记
摘要:andSelf() 1sss 2 3 阅读全文
posted @ 2014-05-16 16:41 苏荷酒吧 阅读(65) 评论(0) 推荐(0)
jQuery HTML
摘要:获得内容--text() html() val()text():设置或者返回所选元素的文本内容html():设置或者返回所选元素的内容(包括HTML标记)val():设置或者返回表单字段的值$("#btn1").click(function(){ alert("Text: " + $("#test... 阅读全文
posted @ 2014-04-22 20:05 苏荷酒吧 阅读(95) 评论(0) 推荐(0)
jQuery效果
摘要:隐藏和显示语法:$(selector).hide(speed,callback);$(selector).show(speed,callback);$(selector).toggle(speed,callback);可以取以下值:"slow"、"fast" 或毫秒。 可选的 callback 参数... 阅读全文
posted @ 2014-04-21 16:48 苏荷酒吧 阅读(146) 评论(0) 推荐(0)
使用jQuery实现CheckBox全选与全不选
摘要:$('#checkedAll').click(function(){ if ($(this).attr('checked')==true) { $('#div input[type=checkbox]').each(function(){ $(th... 阅读全文
posted @ 2014-04-13 23:20 苏荷酒吧 阅读(109) 评论(0) 推荐(0)
使用jQuery遍历后台的json对象
摘要:js解析json字符串数组并自动生成table展示在页面中 HTML: NAME AGE js解析数组 阅读全文
posted @ 2014-04-03 00:31 苏荷酒吧 阅读(404) 评论(0) 推荐(0)
使用jQuery页面加载函数启动定时任务
摘要:var timer;$(document).ready(function(){if (timer == undefined)timer = window.setInterval(showTime, 1000);}); //显示时间function showTime() {var now = new Date();document.getElementById("spanTime").innerHTML = now.toLocaleTimeString();} 阅读全文
posted @ 2014-04-02 00:42 苏荷酒吧 阅读(266) 评论(0) 推荐(0)