Home  >  Article  >  Backend Development  >  javascript-js有没有类似php的定界符EOF之类的用法

javascript-js有没有类似php的定界符EOF之类的用法

WBOY
WBOYOriginal
2016-06-02 11:29:001596browse

javascriptphp

小白一枚
现在要用php抓取某网页html
$url = "http://www.xxxxxxxxxxx.com/h5/12.html";
$value = htmlentities(file_get_contents($url));
抓取后再在网页中用JavaScript处理
var o = '';

如果抓来的数据简短 正常 不报错
但是如果是复杂html或者有换行的话 网页就有报错了
求大神们支招 这种情况下怎么处理呢?
js有没有类似php的定界符EOF之类的用法?

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