以下JS函数用于获取url参数:function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;...
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...
<!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...
var matchStr =window.location.href; var reURL = /^(https):\/\/.+$/; if(!reURL.test(matchStr)){ window.location.href = "https://www.1231818.com/"; }
方法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) {}...
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...
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=...
<!DOCTYPE html> <input type="text" name="account" id="num" class="keyDown" value=""> $(function () { $(".keyDow...
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)){ ...
function GetURLParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { ...