The $.get() request returns an html page and obtains the element _html/css_WEB-ITnose with a specific id of the page.

WBOY
Release: 2016-06-24 11:47:22
Original
2253 people have browsed it

Method 1:

因为data只是一个字符串,并不是一个DOM元素,所以不能用是JQUERY的选择器进行选择的。可以使用字符串正则进行处理。
Copy after login

Method 2:

用js如果不想用正则的话,可以变通实现,创建一个iframe,把<body>里面的所以字符通过document.write()进去,等iframe里面的页面加载完成时,再调用window.frames["iframe的id"].document.getElementById('id').innerHTML
Copy after login


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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!