JQuery Easyui using the tutorial to create a border layout for a Web page

Source: Internet
Author: User

<jquery Easyui Latest version download >

This tutorial shows you how to create a border layout for a Web page using jquery easyui. The border layout provides five areas: East, West, north, south, center, and here are some common uses:

    • North area can be used to display a banner for a website

    • South area can be used to display copyright and other considerations

    • The West area can be used to display the navigation menu

    • East area can be used to display promotional items

    • The center area can be used to display the main content

View Demo

To apply a layout, you should first confirm a layout container and then define some areas. The layout must contain at least one center area. Here is an example layout:

< div class = "easyui-layout" style = "width:400px;height:200px;" > < div region = "west" split = "true" title = "Navigator" style = "width:150px;" > < p style = "padding:5px;margin:0;" >Select language:</ p > < ul > < li >< a href = "javascript:void(0)" onclick = "showcontent(‘java‘)" >Java</ a ></ li > < li >< a href = "javascript:void(0)" onclick = "showcontent(‘cshape‘)" >C#</ a ></ li > < li >< a href = "javascript:void(0)" onclick = "showcontent(‘vb‘)" >VB</ a ></ li > < li >< a href = "javascript:void(0)" onclick = "showcontent(‘erlang‘)" >Erlang</ a ></ li > </ ul > </ div > < div id = "content" region = "center" title = "Language" style = "padding:5px;" > </ div > </ div >

We create a border layout in a "div" container. The layout splits a container into two parts, the left side is a navigation menu, and the right side is the main content.

Finally, we write an OnClick event handler function to retrieve the data, and the "showcontent" function is simple:

function showcontent(language){ $( ‘#content‘ ).html( ‘Introduction to ‘ + language +  ‘ language‘ ); }

Download the Easyui example: Easyui-layout-demo.zip

interested friends can click to see more articles about jquery Easyui !

JQuery Easyui using the tutorial to create a border layout for a Web page

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.