JavaScript escape character
1, for example, want to output in the page:
How does D:\Desktop\pic\baby.png do?
D:\\desktop\\pic\\baby.png
2. Common escape characters: \ t, \ n, \ ', \ ', \ \
3, there is a special place:
Alert (' Today ' weather is good ');//To display the middle double quotes, use single quotation marks on both sides, and double quotation marks on the opposite side.
Process Control Statements
The use of If-else, for, while, Do-while, switch, continue, and break are all very simple, similar to C # and Java usage.
The For loop is slightly different because JavaScript's dynamic language
Use Var when declaring variables:
for (Var i=0;i<10;i++) {...}
Switch judgment is the "= = =" of the type judgment
A chestnut:
<script type= "Text/javascript" > var n=10; Switch (n) { case ': Alert (' is a string '); break; } Alert (' Wow ka ka '); // does not enter the switch loop, it will pop up this wow click. Description switch (n) is all equal to = = =, strictly judged by type </script>
JavaScript escape and Process Control statements