easyUI 初始化的兩種方式:
class方式和js方式;
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <script src="easyui/jquery.min.js"></script> <script src="easyui/jquery.easyui.min.js"></script> <script src="easyui/locale/easyui-lang-zh_CN.js"></script> <script src="js/test001.js"></script> <link rel="stylesheet" href="easyui/themes/default/easyui.css"> <link rel="stylesheet" href="easyui/themes/icon.css"> </head> <body> <!-- Class方式進行設定 --> <div class="easyui-dialog" style="width:600px;height:400px">this is easyui dialog</div> <!-- JS方式進行設定 --> <div id="box" style="width:600px;height:400px">this is second dialog</div> </body> </html>
test001.js
$(function(argument) { // JS方式進行easyUI設定; $('#box').dialog(); });