随笔分类 -  jQuery

摘要:关于本地存储构成数组以及jquery的inArray方法的使用 本地数据格式:娃娃|1.00|9|416|303|198 阅读全文
posted @ 2016-09-05 14:42 ^^-^^- 阅读(897) 评论(0) 推荐(0)
摘要:jQuery应用: 1、表单验证: A:jQuery Validation插件:有时需要将验证的属性写在class中,有时需要将验证信息写在属性中,例如: <input id="cemail" name="email" size="25" class="require email" minlengt 阅读全文
posted @ 2016-02-10 15:59 ^^-^^- 阅读(332) 评论(1) 推荐(0)
摘要:表单应用: 1、设置高度: $comment.height($comment.height() + 50); $comment.animate({height : "+=50"},400); 2、滚动条高度变化,是利用scrollTop属性;eg:文本域的滚动条 3、复选框的全选以及全不选以及反选 阅读全文
posted @ 2016-02-09 16:53 ^^-^^- 阅读(214) 评论(0) 推荐(0)
摘要:事件: 1、//方法1 $(window).load(function(){ }) window.onload=function(){ } //方法2 function one(){ alert("one"); } function two(){ alert("two"); } ( //这样的执行结 阅读全文
posted @ 2016-02-09 16:52 ^^-^^- 阅读(170) 评论(0) 推荐(0)
摘要:Ajax: 1、load()方法: //无参数传递,则是get方式: $("#resText").load("test.php" , function(){ }); //有参数传递,则是post方式 $("#resText").load("test.php" , {name:"rain" , age 阅读全文
posted @ 2016-02-09 16:51 ^^-^^- 阅读(157) 评论(0) 推荐(0)
摘要:jQuery的DOM节点: 1、获取节点的内容 : text()方法 2、查找属性节点,并且的到属性值 attr() var $para = $("p"); var p_text = $para.attr("title"); alert(p_text); 3、创建元素节点: var $li_1 = 阅读全文
posted @ 2016-02-07 13:25 ^^-^^- 阅读(271) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>品牌列表</title> <link rel="stylesheet" type="text/css" href="css/index1.css"> <script type="t 阅读全文
posted @ 2016-02-06 20:44 ^^-^^- 阅读(314) 评论(0) 推荐(0)
摘要:认识JQuery: 1、window.onload与$(document).ready()的区别 window.onload $(document).ready() 执行时机 必须等待网页中的所有内容加载完毕后才能执行 网页中所有DOM结构绘制完毕后就执行,可能DOM元素关联的东西并没有完全加载完 阅读全文
posted @ 2016-02-06 01:11 ^^-^^- 阅读(208) 评论(0) 推荐(0)