zno2

随笔分类 -  JS

1 2 下一页

在 html 通过js 获取查询参数
摘要:file:///E:/test.html?a=1&b=2 <script type="text/javascript"> var getParameters = function() { var search = window.location.search; var obj = {}; if (s 阅读全文

posted @ 2023-08-25 16:27 zno2 阅读(167) 评论(0) 推荐(0)

var vs. let
摘要: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 阅读全文

posted @ 2023-06-06 13:20 zno2 阅读(21) 评论(0) 推荐(0)

Re-Declaring JavaScript Variables
摘要: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被声明 阅读全文

posted @ 2023-06-06 13:20 zno2 阅读(21) 评论(0) 推荐(0)

一个performance 计时统计 设计 (ajax)
摘要: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/ 阅读全文

posted @ 2023-06-06 13:14 zno2 阅读(25) 评论(0) 推荐(0)

®参考文档: JavaScript reference (like:Statements Block ...)
摘要: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 阅读全文

posted @ 2023-06-06 13:13 zno2 阅读(20) 评论(0) 推荐(0)

js 中的 this
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <script type="text/javascript"> var tool = { a : 'some msg', sho 阅读全文

posted @ 2023-06-01 16:56 zno2 阅读(18) 评论(0) 推荐(0)

"2016-10-06T12:09:18.303+0800"
摘要: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 阅读全文

posted @ 2016-10-09 16:23 zno2 阅读(254) 评论(0) 推荐(0)

arrayObj.splice(start, deleteCount, [item1[, item2[, . . . [,itemN]]]])
摘要:测试方法 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 阅读全文

posted @ 2016-08-06 07:19 zno2 阅读(334) 评论(0) 推荐(0)

ajax 本地测试,使用Chrome 浏览器
摘要:出现问题: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 解决办法: "C:\Program F 阅读全文

posted @ 2016-08-06 07:19 zno2 阅读(308) 评论(0) 推荐(0)

运算符 ||
摘要:判断 所有对象都被认为是 true。 字符串当且仅当为空时才被认为是 false。 null 和 undefined 被认为是 false。 数字当且仅当为 0 时才是 false。 NaN 被认为是false。 语法 var result = expression1 || expression2; 阅读全文

posted @ 2016-08-06 07:19 zno2 阅读(108) 评论(0) 推荐(0)

删除对象中的key
摘要:delete obj.a; delete obj["a"]; 阅读全文

posted @ 2016-08-06 07:18 zno2 阅读(1266) 评论(0) 推荐(0)

js 设置回车事件
摘要:document.onkeydown=function(event){ var e = event || window.event || arguments.callee.caller.arguments[0]; if(e && e.keyCode==27){ // 按 Esc //要做的事情 ... 阅读全文

posted @ 2016-08-06 07:18 zno2 阅读(204) 评论(0) 推荐(0)

js set
摘要:打印结果: 阅读全文

posted @ 2016-08-06 07:18 zno2 阅读(118) 评论(0) 推荐(0)

js get 传参 汉字 乱码问题
摘要:js java 阅读全文

posted @ 2016-08-06 07:18 zno2 阅读(402) 评论(0) 推荐(0)

html 返回页面顶部
摘要:window.scroll(0, 0); 阅读全文

posted @ 2016-08-06 07:18 zno2 阅读(190) 评论(0) 推荐(0)

window
摘要: 阅读全文

posted @ 2016-08-06 07:17 zno2 阅读(138) 评论(0) 推荐(0)

cookie
摘要:同key以数组形式存储 window.LS window.sessionStorage 阅读全文

posted @ 2016-08-06 07:17 zno2 阅读(110) 评论(0) 推荐(0)

js date string parse
摘要:api文档备注: dateObj = new Date(year, month, date[, hours[, minutes[, seconds[,ms]]]]) year 必选项。完整的年份,比如,1976(而不是 76)。 month 必选项。表示的月份,是从 0 到 11 之间的整数( 1 阅读全文

posted @ 2016-08-06 07:17 zno2 阅读(188) 评论(0) 推荐(0)

window 方法:延时 和 重复
摘要:window 方法 阅读全文

posted @ 2016-08-06 07:16 zno2 阅读(161) 评论(0) 推荐(0)

正则表达式替换
摘要:"温馨提示,咨询1小时3分20秒后关闭".replace(/\d*秒/, "") "温馨提示,咨询1小时3分后关闭" .replace(regexp, replaceValue) 阅读全文

posted @ 2016-08-06 07:16 zno2 阅读(82) 评论(0) 推荐(0)

1 2 下一页

导航