上一页 1 2 3 4 5 6 ··· 15 下一页
摘要: 1.获取和设置内容和属性 text() - 设置或返回所选元素的文本内容html() - 设置或返回所选元素的内容(包括 HTML 标记)val() - 设置或返回表单字段的值attr() - 方法用于获取属性值 $("#btn1").click(function(){ $("#test1").te 阅读全文
posted @ 2016-10-28 16:58 浪味小仙女 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1.显示隐藏 $(selector).hide(speed,callback);隐藏$(selector).show(speed,callback);显示 $(selector).toggle(speed,callback);显示隐藏 $(selector).hide(speed,callback) 阅读全文
posted @ 2016-10-27 20:08 浪味小仙女 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1.常用事件 click()click() 方法是当按钮点击事件被触发时会调用一个函数。 dblclick()当双击元素时,会发生 dblclick 事件。 mouseenter()当鼠标指针穿过元素时,会发生 mouseenter 事件。 mouseleave()当鼠标指针离开元素时,会发生 mo 阅读全文
posted @ 2016-10-26 19:17 浪味小仙女 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1.安装 从 jquery.com 下载 jQuery 库 <script src="jquery-1.10.2.min.js"></script> 从 CDN 中载入 jQuery <script src="http://libs.baidu.com/jquery/1.10.2/jquery.mi 阅读全文
posted @ 2016-10-26 18:46 浪味小仙女 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1.media控制布局 <link type="text/css" rel="stylesheet" href="css04.css" media="only screen and (max-width:640px)"> <style> @media screen and (max-width:60 阅读全文
posted @ 2016-10-26 17:29 浪味小仙女 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 1.音频 <audio controls> <source src="aaa.ogg" type="audio/ogg"> <source src="bbb.mp3" type="audio/mpeg">您的浏览器不支持 audio 元素。</audio> 在<audio> 与 </audio> 之 阅读全文
posted @ 2016-10-24 18:19 浪味小仙女 阅读(870) 评论(0) 推荐(0) 编辑
摘要: 1.window尺寸 适配所有浏览器的尺寸方案 var w=window.innerWidth|| document.documentElement.clientWidth|| document.body.clientWidth;var h=window.innerHeight|| document 阅读全文
posted @ 2016-10-20 17:40 浪味小仙女 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1.合并数组 var a = ["aaa", "aaaa"];var b = ["bbb", "bbbb", "bbbbb"];var c = ["ccc"];var children = a.concat(b,c); 2.排序 points.sort(); points.sort(function 阅读全文
posted @ 2016-10-20 14:55 浪味小仙女 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1.获取当前时间 var d=new Date(); 2.获取年份 d.getFullYear(); 3.设置具体时间 var d = new Date(); d.setFullYear(2020,10,3); 4.毫秒数 d.getTime();从1970.1.1到现在 5.转成字符串 d.toU 阅读全文
posted @ 2016-10-19 17:25 浪味小仙女 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1.一个字符串可以使用单引号或双引号 2.查找 字符串使用 indexOf() 来定位字符串中某一个指定的字符首次出现的位置 如果没找到对应的字符函数返回-1 lastIndexOf() 方法在字符串末尾开始查找字符串出现的位置。 3.length长度 4.内容匹配 match()函数用来查找字符串 阅读全文
posted @ 2016-10-19 17:07 浪味小仙女 阅读(103) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 15 下一页