tag in JavaScript_javascript skills"} } ] } ]
Home > Web Front-end > JS Tutorial > body text

How to output tag in JavaScript_javascript skills

WBOY
Release: 2016-05-16 16:38:32
Original
1485 people have browsed it

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>

How to output </script> tag in JavaScript_javascript skills

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template