The parser parser of jquery Easyui

Source: Internet
Author: User

Parser is the parser in jquery Easyui, which is used to render the page class.

Automatic rendering

Page Loading process:

    1. Loading HTML page document elements first

    2. Then call $ (). Ready (function () {})

    3. Last Call Parser render page


Manual rendering

Output HTML (EASYUI) element information through the DOM operation, the Easyui page is not initialized, only the original HTML code is displayed

<script type= "Text/javascript" >$ (). Ready (function () {document.getElementById ("info"). Innerhtml= ' <div class= "Easyui-accordion" id= "tt" ><div title= "Title1" >1</div><div title= "Title2" >2</div ></div> ';}); </script>

Effect:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/56/BB/wKiom1SLKhiAr5YOAAAKTbdAhko925.jpg "title=" Qq20141212235559.jpg "alt=" Wkiom1slkhiar5yoaaaktbdahko925.jpg "/>

Manual rendering Required: Add after DOM operation

$.parser.parse (' #info '); Parse a specific node

or $.parser.parse (); Parse the entire page

<script type= "Text/javascript" >$ (). Ready (function () {document.getElementById ("info"). Innerhtml= ' <div class= "Easyui-accordion" id= "tt" ><div title= "Title1" >1</div><div title= "Title2" >2</div    ></div> '; $.parser.parse (' #info '); Parse a specific node//$.parser.parse (); Parse the entire page}); </script>


Effect:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/56/B8/wKioL1SLKuLhus5KAAB7d7QO97g969.jpg "title=" Qq20141213014800.jpg "alt=" Wkiol1slkulhus5kaab7d7qo97g969.jpg "/>

This article is from the "Lao Niu Java" blog, please be sure to keep this source http://liuyj.blog.51cto.com/2340749/1589500

The parser parser of jquery Easyui

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.