Home > Web Front-end > JS Tutorial > Double quotation mark conversion problem embedded in jsp (html) code in js - the event does not respond

Double quotation mark conversion problem embedded in jsp (html) code in js - the event does not respond

PHP中文网
Release: 2017-07-12 18:10:33
Original
1434 people have browsed it

The following is a piece of code that encountered a problem today. The onchange event is written in the select. Without escaping, the code parsed by F12 is messed up. The double quotes are inconsistent with what is written in the content, and there are spaces. Appeared. After a period of exploration, I found that it is enough to add escape where the error occurred (mainly in front of the quotation marks). The following is a useful code for reference.

"

"
+ ''
+ ' '
+ '
'

The above is the detailed content of Double quotation mark conversion problem embedded in jsp (html) code in js - the event does not respond. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template