2015年5月7日
摘要: var oDiv=document.getElementById("test"); alert("style~~~~"+oDiv.style.color); //写在样式表里无法读取,只能得到写在行内的 //属性“getComputedStyle”的值为 null、未定义或不是 Function ... 阅读全文
posted @ 2015-05-07 15:09 转角遇到谁 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 注:为什么不用appendChild()? 因为调用多次.appendChild(),每次都要刷新页面一次。效率也就大打折扣了 阅读全文
posted @ 2015-05-07 14:45 转角遇到谁 阅读(199) 评论(0) 推荐(0) 编辑
摘要: $(".next").click(function(){ setTimeout(function(){$(this).addClass("gray");//指向的是window 而不是$(".next") },1000);}) 阅读全文
posted @ 2015-05-07 14:12 转角遇到谁 阅读(269) 评论(0) 推荐(0) 编辑
  2015年5月5日
摘要: 让ie也兼容placeholder 阅读全文
posted @ 2015-05-05 17:48 转角遇到谁 阅读(115) 评论(0) 推荐(0) 编辑
摘要: var arr=[1,2,3,4];//求和 var sum=eval(arr.join("+")); alert(sum);//返回number类型 阅读全文
posted @ 2015-05-05 16:54 转角遇到谁 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 遮罩层特效(根据鼠标进入离开方向出现) Climber's Delight Climber's Delight Climber's Delight ... 阅读全文
posted @ 2015-05-05 16:45 转角遇到谁 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 举例:$("input").attr("checked") //返回 checked 或 undefined$("input").prop("checked") //返回 true 或 false 阅读全文
posted @ 2015-05-05 16:28 转角遇到谁 阅读(124) 评论(0) 推荐(0) 编辑
摘要: //构造函数function Cat(name,color){ this.name=name; this.color=color;}//原型Cat.prototype={ run:function(){ //操作 alert(this.name+"run"); }, mew:functio... 阅读全文
posted @ 2015-05-05 16:08 转角遇到谁 阅读(201) 评论(0) 推荐(0) 编辑
摘要: word-break:break-all和word-wrap:break-wordword-break:break-all 到达边界时它会把单词截断word-wrap:break-word 到达边界时它会把单词看成一个整体换到下一行 阅读全文
posted @ 2015-05-05 15:59 转角遇到谁 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1、grayscale用法: -moz-filter: grayscale(100%) ; -webkit-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: graysc... 阅读全文
posted @ 2015-05-05 15:31 转角遇到谁 阅读(225) 评论(0) 推荐(0) 编辑