Home >Web Front-end >HTML Tutorial >Automatic rendering of dynamically added HTML_html/css_WEB-ITnose

Automatic rendering of dynamically added HTML_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:41:371256browse

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");

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.

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