Home > Web Front-end > JS Tutorial > body text

The art of comments - writing HTML directly in JS without escaping_Basic knowledge

WBOY
Release: 2016-05-16 19:22:30
Original
1067 people have browsed it

利用JS的多行注释配合函数的直接量可以做到JS里直接写HTML代码,除 script 的结束标签之外,无需任何的转义符和续行符。


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
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