Use of JQueryEasyUI Layout Framework

Source: Internet
Author: User

Layout is a layout panel:

That is, the container layout has five layout areas: north, south, east, west and center. The central area Panel is required, but the central area panel Edge Area panel is optional. You can adjust each edge area by dragging its border and panel. Nested la s are supported so that users can build complex la S.

If you want to change the frame size in each region with the frame size, nest it in the layout frame;
Copy codeThe Code is as follows:
<Script type = "text/javascript">
// Split attribute: if it is set to true, a separator bar is displayed. You can drag the separator bar to change the layout panel size.
// Href attribute: loads the part of the page body in the specified area. Other parts are not loaded.
// In the panel framework, we can see such a regular expression selection (which can be changed as needed ):
// Extractor: function (data ){
// Var pattern =/<body [^>] *> (. | [\ n \ r]) *) <\/body>/im;
// Var matches = pattern.exe c (data );
// If (matches ){
// Return matches [1]; // only extract body content
//} Else {
// Return data;
//}
//}
// Panel attribute: return a specific layout panel. The 'region' parameter can be set to 'north', 'south', 'east', 'west', and 'center '.
Function getPanel (){
Var southPanel = $ ("# layoutbody"). layout ('panel ', 'south ');
// Obtain the panel attributes
Var attributes = southPanel. panel ('options ');
Console.info (attributes); // you can view all the attributes and debug the browser. It is explained that browser debugging is essential to use this framework and use js to write the front-end code: firefox or Google
}
</Script>
</Head>
<Body id = "layoutbody" class = "easyui-layout">
<Div data-options = "region: 'North ', title: 'North title', split: true" style = "height: 100px;">
</Div>
<Div data-options = "region: 'south', title: 'southtitle', split: true" style = "height: 100px;">
</Div>
<Div data-options = "region: 'east', iconCls: 'icon-reload', title: 'east', split: true" style = "width: 100px;">
</Div>
<Div data-options = "region: 'west', title: 'west', split: true" style = "width: 100px;">
<Input type = "button" value = "Get panel" onclick = "getPanel ();"/>
</Div>
<Div data-options = "region: 'center', title: 'centertitle'" href = "Index.htm" style = "padding: 5px;
Background: # eee; ">
<Input type = "button" value = "Get panel" onclick = "getPanel ();"/> <! -- If the href attribute is specified here, the code we write in this part will not be implemented. -->
</Div>
</Body>
</Html>

Related Article

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.