JavaScript Eject </script> tag Error Resolution

Source: Internet
Author: User

In JS pop-up ' will let JS mistakenly think this is an end tag, and an exception.

such as the following code

Marking error resolution-script JavaScript ">

We're in the ' string, and the result is mistaken for the end tag, and vim has changed color. Run results

Marking error resolution-script and JavaScript ">

As the end tag is used in the string, there is an exception, which is obviously not the result we want. We just need to do a little processing of the code to achieve.

Marking error resolution-script and JavaScript ">

Use the plus link string in ', and then look at the running result

Marking error resolution-javascript tags >

Program normal, correct pop-up string ', in JS if string uses plus sign equals connection, number uses plus sign equals add

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.