随笔分类 - JavaScript
摘要:How to run a function when the page is loaded? window.onload = codeAddress; should work - here's a demo, and the full code: 方法1 方法2
阅读全文
摘要:Where should I put <script> tags in HTML markup? When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and
阅读全文
摘要:What is event bubbling and capturing? 答案1 Event bubbling and capturing are two ways of event propagation in the HTML DOM API, when an event occurs in
阅读全文
摘要:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice The slice() method returns a shallow copy of a portion of
阅读全文
摘要:What's the difference between using “let” and “var”? ECMAScript 6 introduced the let statement. I've heard that it's described as a local variable, bu
阅读全文
摘要:https://stackoverflow.com/questions/3010840/loop-through-an-array-in-javascript?page=1&tab=votes#tab-top 答案1 Use a sequential for loop: @zipcodeman su
阅读全文
摘要:https://stackoverflow.com/questions/4775722/check-if-object-is-an-array One of the weird behaviour and spec in Javascript is the typeof Array is Objec
阅读全文
摘要:http://howtocheckversion.com/check-html-version-website/ Check HTML version via W3C W3 Consortium has a free HTML free validation service that can tel
阅读全文
摘要:https://stackoverflow.com/questions/7604419/resharper-javascript-use-of-implicitly-declared-global-variable-x/8132307 https://github.com/taye/interact
阅读全文
摘要:https://stackoverflow.com/questions/11263425/page-resolveurl-is-not-working-in-javascript The problem, as poncha pointed out, is that as far as ASP.NE
阅读全文
摘要:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN The global NaN property is a value representing Not-A-Number. NaN
阅读全文
摘要:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals 需要注意的是ie不支持
阅读全文
摘要:https://docs.microsoft.com/en-us/visualstudio/cross-platform/tools-for-cordova/debug-test/basic-tests-with-jasmine?view=toolsforcordova-2017 https://d
阅读全文
摘要:3.1 语法 3.1.1 区分大小写 3.1.2 标识符 3.1.3 注释 3.1.4 严格模式strict mode "use strict" 3.1.5 语句 3.2 关键字和保留字 3.3 变量 3.4 数据类型
阅读全文
摘要:prototype.js https://github.com/sstephenson/prototype moment js https://github.com/moment/moment three.js https://github.com/mrdoob/three.js/ Select2
阅读全文
摘要:https://www.jianshu.com/p/8247a9401725 2.1 Script元素 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script <script>定义了下列6个属性: async:可选。async
阅读全文
摘要:http://www.w3school.com.cn/js/pro_js_implement.asp 出自《JavaScript高级程序设计(第3版)》 1.1 JavaScript简史 1997年,以JavaScript 1.1为蓝本的建议被提交给了欧洲计算机制造商协会(Ecma,European
阅读全文
摘要:C# String.IsNullOrEmpty Javascript equivalent https://stackoverflow.com/questions/5746947/c-sharp-string-isnullorempty-javascript-equivalent 扩展 https:
阅读全文
摘要:https://www.codeproject.com/script/articles/articleversion.aspx?aid=1019659&av=2163976&msg=5111300 https://github.com/sheshbabu/PowerShell-Minify
阅读全文
摘要:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify The JSON.stringify() method converts a JavaScript valu
阅读全文