06 2018 档案

摘要:比如document.body,最好是写成document.getElementsByTagName("body")[0]; 阅读全文
posted @ 2018-06-30 11:21 杨不凡 阅读(178) 评论(0) 推荐(0)
摘要:window.onscroll = function(){ var sl = -Math.max(document.body.scrollLeft,document.documentElement.scrollLeft); document.getElementById("id").style.le 阅读全文
posted @ 2018-06-28 20:33 杨不凡 阅读(498) 评论(0) 推荐(0)
摘要:var top = document.documentElement.scrollTop + document.body.scrollTop; document.documentElement.scrollTop = 3000; $('body,html').animate({scrollTop:3 阅读全文
posted @ 2018-06-28 18:37 杨不凡 阅读(113) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-06-25 09:29 杨不凡 阅读(444) 评论(0) 推荐(0)
摘要:创建数组 <script>var i;var mycars = new Array();mycars[0] = "Saab";mycars[1] = "Volvo";mycars[2] = "BMW";for (i=0;i<mycars.length;i++){ document.write(myc 阅读全文
posted @ 2018-06-23 11:04 杨不凡 阅读(175) 评论(0) 推荐(0)
摘要:“Missing semicolon.” : “缺少分号.”, “Use the function form of \”use strict\”.” : “使用标准化定义function.”, “Unexpected space after ‘-’.” : “在’-'后面不应出现空格.”, “Exp 阅读全文
posted @ 2018-06-22 16:24 杨不凡 阅读(599) 评论(0) 推荐(0)
摘要:var arr = Object.keys(typeARR); var str = ''; var len = arr.length; for(var i = 0;i<len;i++){ str += '{code : " ' + i '" + typeARR[i] + ' "},'; } str 阅读全文
posted @ 2018-06-22 15:56 杨不凡 阅读(253) 评论(0) 推荐(0)
摘要:function compareTime(st,et){ st = new Date(st.substr(0,4),st.substr(5,2),st.substr(8,2),st.substr(11,2),st.substr(14,2),st.substr(17,2));//时间1 et = ne 阅读全文
posted @ 2018-06-22 14:21 杨不凡 阅读(134) 评论(0) 推荐(0)
摘要:zIndex:layer.zIndex, success:function(index,layero){ //layero 为当前层的DOM对象 var zIndex = layer.index; $(layero).css('z-index',zIndex); //更改显示层级,防止多层弹窗显示层 阅读全文
posted @ 2018-06-20 16:30 杨不凡 阅读(863) 评论(0) 推荐(0)
摘要:Array.isArray(obj);结果为true或者false 阅读全文
posted @ 2018-06-20 09:15 杨不凡 阅读(92) 评论(0) 推荐(0)
摘要:zIndex:layer.zIndex, success : function(layero){ var zIndex = layer.index; $(layero).css(‘z-index’,zIndex); } 阅读全文
posted @ 2018-06-19 16:03 杨不凡 阅读(386) 评论(0) 推荐(0)