上一页 1 ··· 9 10 11 12 13 14 下一页
摘要: <script type="text/javascript"> function getRandom(n,m){ var n=Number(n); //强制转换成数字 var m=Number(m); if(isNaN(n)||isNaN(m)){ //判断是否为有效数字 ,其中一个不是有效数字就返 阅读全文
posted @ 2016-06-28 00:30 FallenLunatic 阅读(149) 评论(0) 推荐(0) 编辑
摘要: <!doctype html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <style> *{ margin: 0; padding: 0; } #box{ width: 300px; height: 3 阅读全文
posted @ 2016-06-27 17:44 FallenLunatic 阅读(153) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE HTML><html><head><meta charset="utf-8"><title>盒阴影</title><meta name="Keywords" content=""><meta name="Description" content=""><link rel="sty 阅读全文
posted @ 2016-06-27 17:30 FallenLunatic 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 代码描述: <!DOCTYPE HTML><html><head><meta charset="utf-8"/><title> New Document 111111111 </title><meta name="Keywords" content=""><meta name="Descriptio 阅读全文
posted @ 2016-06-16 17:43 FallenLunatic 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 代码描述: <!doctype html><html lang="en"><head><meta charset="utf-8"><title>canvas运动</title><style> </style></head><body> <canvas width="500" height="300" 阅读全文
posted @ 2016-06-16 17:41 FallenLunatic 阅读(517) 评论(0) 推荐(0) 编辑
摘要: jQuery 选择器选择器 实例 选取* $("*") 所有元素#id $("#lastname") id="lastname" 的元素.class $(".intro") 所有 class="intro" 的元素element $("p") 所有 <p> 元素.class.class $(".in 阅读全文
posted @ 2016-05-21 10:48 FallenLunatic 阅读(2590) 评论(0) 推荐(0) 编辑
摘要: 基本选择器:$(“#test”)选取id为test的元素 单个元素$(“.test”)选取所有class为test的元素 集合元素$(“p”)选取所有的<p>元素 集合元素$(“*”)选取所有的元素 集合元素$(“div,span,p.myClass”)选取所有<div>,<span>和拥有clas 阅读全文
posted @ 2016-05-21 10:46 FallenLunatic 阅读(166) 评论(0) 推荐(0) 编辑
摘要: cookie是浏览器提供的一种机制,它将document 对象的cookie属性提供给JavaScript。可以由JavaScript对其进行控制,而并不是JavaScript本身的性质。cookie是存于用户硬盘的一个文件,这个文件通常对应于一个域名,当浏览器再次访问这个域名时,便使这个cooki 阅读全文
posted @ 2016-05-05 15:24 FallenLunatic 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1.this是js的一个关键字,随着函数使用场合不同,this的值会发生变化。但是总有一个原则,那就是this永远指向其所在函数的所有者,如果没有所有者时,指向全局对象window。它代表函数运行时,自动生成的一个内部对象,只能在函数内部使用。 首先分析this所在的函数,是哪个对象调用的, 则该对 阅读全文
posted @ 2016-05-03 11:13 FallenLunatic 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1.jsonp跨域 jsonp跨域是通过script标签的跨域请求资源的能力,先利用JS在dom中创建一个script,把json里的url地址赋给script的src属性,然后新建一个script把url地址赋给script。 获取数据的方法:通过callback回调函数,把回调函数给cd (&c 阅读全文
posted @ 2016-04-29 16:12 FallenLunatic 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 下一页