Parser is the parser in jquery Easyui, which is used to render the page class.
Automatic rendering
Page Loading process:
Loading HTML page document elements first
Then call $ (). Ready (function () {})
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