tag in JavaScript_javascript skills"} } ] } ]
When '' pops up in How to output tag in JavaScript_javascript skills, How to output tag in JavaScript_javascript skills will mistakenly think that this is a closing tag, and an exception will occur.
Such as the following code
We used alert to pop up the '' string within the <script> block, but it was mistaken for an end tag and VIM changed color. Running results</script>
Because the string is regarded as the end tag, an exception occurs. Obviously this is not the result we want. We just need to process the code a little bit to achieve it.
Use the plus sign to link the string in '', '' 'ipt>' and see the results
The program is normal and the string '' pops up correctly. In How to output tag in JavaScript_javascript skills, if the string uses a plus sign, it equals connection, and the number uses a plus sign, which equals addition.