search

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中文网
PHP中文网Original
2017-07-12 18:10:331431browse

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!

Statement:
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
Previous article:js timestamp conversion dateNext article:js timestamp conversion date

Related articles

See more