
JavaScript
ITBOY_ITBOX
技术人生,管理天涯
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
JavaScript遮蔽层
//获取项目的名称 function getRootPath() { var strFullPath = window.document.location.href; var strPath = window.document.location.pathname; var pos = strFullPath.indexOf(strPath); var pre翻译 2017-03-01 21:46:44 · 253 阅读 · 0 评论 -
JavaScript显示日期与时间
//获取当前系统时间 function GetTime() { var now = new Date(); var str, colorhead, colorfoot; var yy = now.getYear(); if (yy < 1900) yy = yy + 1900; var MM = now.getMonth() +翻译 2017-03-01 21:49:25 · 539 阅读 · 0 评论 -
兼容不同的浏览器时间
function addDate(date, days) { //For the sake of browser incompatibility between doing format conversion var getDate= new Date(Date.parse(date.replace(/-/g, “/”))); // var newdate;翻译 2017-03-01 21:50:10 · 263 阅读 · 0 评论 -
动态显示时
//时间function GetTime() { var now = new Date(); var str, colorhead, colorfoot; var yy = now.getYear(); if (yy < 1900) yy = yy + 1900; var MM = now.getMonth() + 1; if (MM翻译 2017-03-01 21:51:43 · 235 阅读 · 0 评论 -
判断是否是ipad
ipad用的是Safari Mobile浏览器,访问的UA为:Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10下面就介绍几个判断是否是ipad的浏览器的方法,都很简单。翻译 2017-03-01 21:52:25 · 895 阅读 · 0 评论 -
动态显示时
//时间function GetTime() { var now = new Date(); var str, colorhead, colorfoot; var yy = now.getYear(); if (yy < 1900) yy = yy + 1900; var MM = now.getMonth() + 1; if (MM翻译 2017-03-01 21:52:56 · 232 阅读 · 0 评论