摘要: //将N个table的所有td按行合并为数组function getTdArray(){ var tableArray=arguments; var rowNow=0; while(tableArray[0].rows[rowNow].cells[0].nodeName.toLowerCase()!="td")rowNow++; var tdArray=[]; for(var i=rowNow;i<tableArray[0].rows.length;i++){ for(var j=0;j<tableArray.length;j++){ for(var k=0;k 阅读全文
posted @ 2012-03-09 16:40 码农13 阅读(844) 评论(0) 推荐(0) 编辑
摘要: //日期 /.-转Date Date转/.-默认-function StringToDate(DateStr) { var separator="-"; if(DateStr.indexOf("/")>-1)separator="/"; if(DateStr.indexOf(".")>-1)separator="."; var converted = Date.parse(DateStr); var myDate = new Date(converted); if (isNaN(my 阅读全文
posted @ 2012-03-09 16:03 码农13 阅读(760) 评论(0) 推荐(0) 编辑
摘要: var header=["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30", 阅读全文
posted @ 2012-03-07 21:34 码农13 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 添加层关闭我这里是要显示的内容 阅读全文
posted @ 2012-03-07 10:06 码农13 阅读(86) 评论(0) 推荐(0) 编辑
摘要: .transparentDiv{ filter:alpha(opacity=60); /*IE*/ -moz-opacity:0.4; /*MOZ FF*/ opacity:0.4; /*CSS3 FF1.5*/} 阅读全文
posted @ 2012-03-07 09:55 码农13 阅读(130) 评论(0) 推荐(0) 编辑
摘要: //两个Date之间,有多少个星期X 86400000function getCountOfWeekX(startDate,endDate,weekX){ var result=0; var start=startDate.getTime(); var end=endDate.getTime() for(var i=start;i<=end;i+=86400000){ if(new Date(i).getDay()==weekX){ result++; } } return result;}function StringToDate(DateStr) { var conver... 阅读全文
posted @ 2012-03-06 23:34 码农13 阅读(679) 评论(0) 推荐(0) 编辑
摘要: <select id="selectYear" onchange="yearChange(this.options[this.selectedIndex].text)"> <option>2010</option> <option>2011</option> <option>2012</option> <option>2013</option> </select><script type="text/javascript 阅读全文
posted @ 2012-03-05 23:35 码农13 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 常见的做法是node.style.width之流但有些样式如vertical-align等,实在不想查它在javascript中如何表示。用node.setAttribute("style","xxx");也可以修改node的内联样式。但在IE下不行还是乖乖地写个类,然后addClass吧 阅读全文
posted @ 2012-03-05 22:47 码农13 阅读(140) 评论(0) 推荐(0) 编辑
摘要: //检验字符串中是否包含1900-2050的日期子字符串 var dateReg_null_ymd=new RegExp("(([2-9][0-9]|1[6-9])?[0-9]{2}([-\/\.])?((1[0-2]|0?[1-9])([-\/\.])?(2[0-8]|1[0-9]|0?[1-9])|(1[0-2]|0?[13-9])([-\/\.])?(29|30)|(1[02]|0?[13578])([-\/\.])?(31))|((1[6-9]|[2-9][0-9])?(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579] 阅读全文
posted @ 2012-03-02 17:33 码农13 阅读(1309) 评论(0) 推荐(0) 编辑
摘要: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><!--eg.--><script type=”text/javascript” src=”test.js” charset=”utf-8″></script><script type=”text/javascript” src=”test1.js” charset=”gb2312″></script> 阅读全文
posted @ 2012-03-02 17:14 码农13 阅读(140) 评论(0) 推荐(0) 编辑