<A href = "javascript: document. write ('<a href =/'www .baidu.com/'> Baidu </a> ') "> All quotation marks in A-href </a> statement, how can I change between single quotation marks and double quotation marks when escape characters can be used? How should we set quotation mark nesting like this? Is it regular? Is it generally enclosed in single quotes with double quotation marks?
When splicing a JS string, the double quotation marks must be single quotation marks, and the single quotation marks must be double quotation marks. This loop! However, all double quotation marks are acceptable, that is, the double quotation marks in the double quotation marks must be escaped!
When using the nested single quotes and double quotes, pay attention to the following points:
1. Single (double) quotation marks start and end with single (double) quotation marks. Pair
2. single quotation marks are placed before and followed by double quotation marks
3. Double quotation marks before and single quotation marks behind
4. If single quotation marks are placed in front, followed by double quotation marks or double quotation marks, and single quotation marks or double quotation marks are placed in front, escape characters must be added.