Automatic rendering of dynamically added HTML_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:41:37
Original
1235 people have browsed it

In the past two days, I was writing a front-end using EasyUI. I encountered the problem of dynamically adding HTML content to Layout without automatic rendering. I checked the information on the Internet and solved it. The details are as follows:

$("#content").html(data);$.parser.parse("#content");
Copy after login

Among them, #content is the Id of layout, and data is the HTML code added to the #content container.

The first line of code is to set the HTML of the DOM element whose Id is #content to the value of data.

The second line of code is used to render the DOM element whose Id is #content and its sub-elements.

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

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