


Things you need to pay attention to and some basic syntax when using JavaScript_Basic knowledge
May 16, 2016 pm 06:20 PM1. Javacsript implements hyperlinks: <a href="javascript ('Hello')>Dandian</a>
2. Function calls in JavaScript can precede function declarations.
3. JavaScript does not require all paths to have a return value like in C#. If there is no return value, it returns undefined
Anonymous function:
var f1=function(i1,i2){return i1 i2};
Alert(f1(10,12));
Alert(function( i1,i2){return i1 i2}(10,12));
4. There is no concept of namespace in Javascript. Functions with the same name in two js files are quoted as last or last The declared function shall prevail.
When referencing external js files: it cannot be <script src="…" type=" text/javascript" />, it must be written as: <script src="…" type="text /javascript" ></script>
5. There is no class syntax in Javascript, which is simulated with function closures.
6. Arrays in JS are not just ordinary Arrays can also be used as Dictionary and Stack. 🎜>var array=new Array();
array["人"]="ren";
array["口"]="kou";

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to implement an online speech recognition system using WebSocket and JavaScript

WebSocket and JavaScript: key technologies for implementing real-time monitoring systems

How to implement an online reservation system using WebSocket and JavaScript

How to use JavaScript and WebSocket to implement a real-time online ordering system

JavaScript and WebSocket: Building an efficient real-time weather forecasting system

Simple JavaScript Tutorial: How to Get HTTP Status Code

How to get HTTP status code in JavaScript the easy way

How to use insertBefore in javascript
