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>