JQuery Easy UI Learning (1) -- How to Use easyui and import js Sequence

Source: Internet
Author: User

Zookeeper 1. First, create a js folder under the WebRoot directory and import the compressed JavaScript package of easy-ui. 2. Import js of easy ui on the HTML page
1. Import all js files at a time: (this is recommended)
<1>. Reference jQuery's js File
<Script type = "text/javascript" src = "../js/jquery-easyui-1.3.5/jquery. min. js"> </script>
<2>. Reference The Js file of Easy UI
<Script type = "text/javascript" src = "../js/jquery-easyui-1.3.5/jquery. easyui. min. js"> </script>
<3>. Import the theme Css file of Easy UI

<4>. Import the Css file of the Easy UI icon.

<5>. Reference The International File of Easy UI to show Chinese characters.
<Script type = "text/javascript" src = "../js/jquery-easyui-1.3.5/locale/easyui-lang-zh_CN.js"> </script>
<6>. Add UTF-8 code on the page

<7>. Use components (using dialog as an example)

<script type = "text/javascript" charset = "UTF-8"> $(function(){  $('#dd').dialog({   modal:true  }); });</script>Dialog

Or use class to add components: (this one can be used for a single import at the same time)
<script type = "text/javascript" charset = "UTF-8"> $(function());</script>Dialog

2. Import a single js:
<1>. Reference jQuery's Js File
<Script type = "text/javascript" src = "../js/jquery-easyui-1.3.5/jquery. min. js"> </script>
<2> reference easyLoader. js
<Script type = "text/javascript" src = "../js/jquery-easyui-1.3.5/easyloader. js"> </script>
<3>. Use components (same as above)
<Script type = "text/javascript" charset = "UTF-8"> $ (function () {easyloader. load ('Dialog ', function () {$ (' # dd '). dialog ({modal: true}) ;});/* easyloader can be changed to using */</script>


To load two components, use an array:
<script type = "text/javascript" charset = "UTF-8">   $(function(){    easyloader.load(['dialog','messager'],function(){     $('#dd').dialog({      modal : true     });     $.messager.alert('Title','load ok');    });   });  </script>





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.