摘要: $(function(){ var _index=0; var Time = null; var Sudu=""; for(a=1;a"+a+"") } $("#btn span").eq(0).addClass("cur"); function autoTime(){ if(_index<$("#fl... 阅读全文
posted @ 2016-02-23 12:07 MasterC 阅读(246) 评论(0) 推荐(0) 编辑
摘要: var _px = document.getElementById("px"); var con=document.getElementById("content"); px.onclick=function(){ /*定义需要用到的变量*/ var fli=document.getElementB 阅读全文
posted @ 2016-02-16 08:57 MasterC 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 头部文件 定义 <?php if(!isset($CATEGORYS)) { $CATEGORYS = getcache('category_content_'.$siteid,'commons'); } ?> 阅读全文
posted @ 2016-01-29 00:46 MasterC 阅读(502) 评论(0) 推荐(0) 编辑
摘要: function uaredirect(f){try{if(document.getElementById("bdmark")!=null){return}var b=false;if(arguments[1]){var e=window.location.host;var a=window.loc... 阅读全文
posted @ 2016-01-15 09:52 MasterC 阅读(655) 评论(0) 推荐(0) 编辑
摘要: js提供了parseInt()和parseFloat()两个转换函数。前者把值转换成整数,后者把值转换成浮点数。只有对String类型调用这些方法,这两个函数才能正确运行;对其他类型返回的都是NaN(Not a Number)。四舍五入以下处理结果会四舍五入:varnum =2.446242342;... 阅读全文
posted @ 2016-01-04 13:01 MasterC 阅读(1012) 评论(0) 推荐(0) 编辑
摘要: function fx(id){var obj= document.getElementById(id);var fun=function(e){ var w=obj.offsetWidth; var h=obj.offsetHeight; var y=e.clientY; ... 阅读全文
posted @ 2015-12-27 22:16 MasterC 阅读(236) 评论(0) 推荐(0) 编辑
摘要: js生成当前时间 var today=new Date(); function itArray(){ this.length=itArra... 阅读全文
posted @ 2015-12-17 09:43 MasterC 阅读(969) 评论(0) 推荐(0) 编辑
摘要: 仿jQuery的siblings效果的js原生代码《previousSibling》 属性返回选定节点的上一个同级节点(在相同树层级中的前一个节点)。《nextSibling》属性返回被选节点的下一个同级节点(在相同树层级中的下一个节点)。如果不存在这样的节点,则该属性返回 null。//元素节点的... 阅读全文
posted @ 2015-11-08 21:58 MasterC 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 首先要获取userid然后再判断是否为空{if $userid} 。。。这里写已经登录之后的代码。。。{else} 。。。这里写已经登录之后的代码。。。{/if}搞定。 阅读全文
posted @ 2015-11-04 18:16 MasterC 阅读(457) 评论(0) 推荐(0) 编辑
摘要: var xmlHttp; function createxmlHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlHttp=new XMLHttpRequest(); } ... 阅读全文
posted @ 2015-10-27 14:50 MasterC 阅读(160) 评论(0) 推荐(0) 编辑