摘要:file:///E:/test.html?a=1&b=2 <script type="text/javascript"> var getParameters = function() { var search = window.location.search; var obj = {}; if (s
阅读全文
摘要:Block A block statement is used to group zero or more statements. The block is delimited by a pair of curly brackets. let (顺序声明,顺序赋值) Declares a block
阅读全文
摘要:If you re-declare a JavaScript variable, it will not lose its value. https://www.w3schools.com/js/js_variables.asp var a = a || '123'; 上面这个例子,如果之前a被声明
阅读全文
摘要:Ajax https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started http://api.jquery.com/jQuery.ajax/ Cookie https://developer.mozilla.org/en-US/docs/
阅读全文
摘要:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference A block statement (or compound statement in other languages) is used to group zero o
阅读全文
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <script type="text/javascript"> var tool = { a : 'some msg', sho
阅读全文
摘要:Java 输出结果: JavaScript 输出结果: T 是什么 http://www.w3schools.com/js/js_date_formats.asp The T in the date string, between the date and time, indicates UTC t
阅读全文
摘要:测试方法 case1: arr.splice(1,0,'a'); case2: arr.splice(1,1,'a'); case3: arr.splice(1,2,'a'); case4: arr.splice(1,5,'a'); 初步总结 start 为数组下标位置 deleteCount 为0
阅读全文
摘要:出现问题: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 解决办法: "C:\Program F
阅读全文
摘要:判断 所有对象都被认为是 true。 字符串当且仅当为空时才被认为是 false。 null 和 undefined 被认为是 false。 数字当且仅当为 0 时才是 false。 NaN 被认为是false。 语法 var result = expression1 || expression2;
阅读全文
摘要:delete obj.a; delete obj["a"];
阅读全文
摘要:document.onkeydown=function(event){ var e = event || window.event || arguments.callee.caller.arguments[0]; if(e && e.keyCode==27){ // 按 Esc //要做的事情 ...
阅读全文
摘要:同key以数组形式存储 window.LS window.sessionStorage
阅读全文
摘要:api文档备注: dateObj = new Date(year, month, date[, hours[, minutes[, seconds[,ms]]]]) year 必选项。完整的年份,比如,1976(而不是 76)。 month 必选项。表示的月份,是从 0 到 11 之间的整数( 1
阅读全文
摘要:"温馨提示,咨询1小时3分20秒后关闭".replace(/\d*秒/, "") "温馨提示,咨询1小时3分后关闭" .replace(regexp, replaceValue)
阅读全文