js在博客底部加上网站已运行时间

js在博客底部加上网站已运行时间

function show_runtime() {window.setTimeout("show_runtime()",1000);X=new Date("3/15/2019 15:00:00"); Y=new Date();T=(Y.getTime()-X.getTime());M=24*60*60*1000; a=T/M;A=Math.floor(a);b=(a-A)*24;B=Ma...

前端 2019-12-19 AM 2066次 0条
JS实现中文简繁切换

JS实现中文简繁切换

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml...

前端 2019-12-14 PM 1879次 0条
js 强制跳转https

js 强制跳转https

var matchStr =window.location.href; var reURL = /^(https):\/\/.+$/; if(!reURL.test(matchStr)){ window.location.href = "https://www.1231818.com/"; }

前端 2019-12-02 AM 3272次 0条
js 判断客户端自动跳转

js 判断客户端自动跳转

方法1: try { if (location.search.indexOf('?pc') !== 0 && /Android|Windows Phone|iPhone|iPod/i.test(navigator.userAgent)) { window.location.href = 'https://xw.qq.com?f=qqcom'; } } catch (e) {}...

前端 2019-12-02 AM 2832次 0条
js中 new Date().getTime()得到的是毫秒数

js中 new Date().getTime()得到的是毫秒数

js中 var time = new Date().getTime()得到的是毫秒数 window.alert( new Date().getTime()); 0、时间戳转日期字符串function getLocalTime(nS) { var d = new Date(parseInt(nS)* 1000); //根据时间戳生成的时间对象 var date = (d.g...

前端 2019-11-02 AM 3462次 0条
js 弹出自定义大小网页窗口

js 弹出自定义大小网页窗口

function openWin(u, w, h) { var l = (screen.width - w) / 2; var t = (screen.height - h) / 2; var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=...

前端 2019-11-02 AM 1812次 0条
jquery input  监听回车按键

jquery input 监听回车按键

<!DOCTYPE html> <input type="text" name="account" id="num" class="keyDown" value=""> $(function () { $(".keyDow...

前端 2019-11-02 AM 2708次 0条
jqurey 验证收集

jqurey 验证收集

function checkAccount(){var phone = $.trim($("#account").val()); var reg = /^0?1[345678]\d{9}$/; var $el = $("#account_error"); if (!reg.test(phone) || (phone.length != 11)){ ...

前端 2019-11-02 AM 2609次 0条
js 获取url参数

js 获取url参数

function GetURLParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { ...

前端 2019-11-01 PM 1932次 0条
js getBrowserTime

js getBrowserTime

function getBrowserTime() {d0 = new Date();// return d0.toJSON().substr(0,19).replace(/[-T\:]/g,"");var now = d0.getFullYear()*10000000000 + (d0.getMonth()+1)*100000000 + d0.getDate()*1000000 + ...

前端 2019-11-01 PM 1808次 0条
破解JS加密:url unicode加密而已

破解JS加密:url unicode加密而已

破解JS加密:url unicode加密而已加密所在的地方:http://tool.chinaz.com/Tools/UrlCrypt.aspx?url=www.baidu.com 结果:     http://%77%77%77%2E%62%61%69%64%75%2E%63%6F%6D/ 替换:http://\x77\x77\x77\x2E\x62\x61\x69\x64\x75\x2E...

前端 2019-10-31 AM 2897次 0条