JavaScript conforms to the ever-evolving ECMAScript standard.
ECMAScript 2015 is the current cutting-edge specification, previously known as ECMAScript 6 (ES6).
| jQuery |
|---|
| Library of JavaScript functions |
| Introduces CSS-like syntax and several visual and UI enhancements |
| Simplifies the use of Javascript in websites |
| An abstraction of the core language |
JavaScript Frameworks
Angular JS, React, Vue.js, and so on are front-end application frameworks used to simplify the building of advanced interactive web-based applications.
Javascript Loading Methods:
- Right away loading
- Asynchronous loading
- Deferred loading


Here’s how a page loads a script with defer, put in the head tag:
The script is fetched asynchronously, and it’s executed only after the HTML parsing is done.
Parsing finishes just like when we put the script at the end of the body tag, but overall the script execution finishes well before, because the script has been downloaded in parallel with the HTML parsing.
JavaScript is case sensitive and using camelCase is recommended. Whitespace matters only to humans, not to JavaScript. End each statement with a semicolon is recommended. Comments should be used liberally to assist understanding of the code.
Variable declared without "var" will have global scope automatically.
DOM Element Creation Methods:
.createElement(); //create an element.
.createTextNode(); //create text node.
.appendChild(); //place one child node inside another.
Inline CSS:
.hasAttribute("style"); /*does the element has style? */
.getAttribute("style"); /*get the inline styles.*/
.setAttribute("style", "color:red"); /* add css property.*/
.removeAttribute("style"); /*remove inline styles.*/
break; // terminate the current loop.
continue; //terminate the current iteration of the loop
Tips and Resources:
https://brave.com/ a browser
Ctrl+Shift+J to open console in Chrome.
When writing in console, hit shift + enter keys to switch to the next line without adding a line break.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
本文深入探讨了JavaScript遵循的ECMAScript标准,包括最新的ECMAScript2015(ES6)。介绍了jQuery库简化网站JavaScript使用的方法,以及AngularJS、React、Vue.js等前端框架如何简化复杂Web应用的开发。讨论了JavaScript的加载策略,如延迟加载和异步加载,以及语法和变量作用域的最佳实践。最后,提供了DOM操作和资源链接。
1630

被折叠的 条评论
为什么被折叠?



