jQuery教程 7个jQuery easy ui基本组件
沉沙 2018-10-19 来源 : 阅读 1392 评论 0

摘要:本篇教程介绍了jQuery教程 7个jQuery easy ui基本组件,希望阅读本篇文章以后大家有所收获,帮助大家对jQuery的理解更加深入。

本篇教程介绍了jQuery教程 7个jQuery easy ui基本组件,希望阅读本篇文章以后大家有所收获,帮助大家对jQuery的理解更加深入。

<



以下给出7个jquery easy ui 基本组件;
1 基本面板
<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Basic Panel - jQuery EasyUI Demo</title>
 <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
 <link rel="stylesheet" type="text/css" href="../themes/icon.css">
 <link rel="stylesheet" type="text/css" href="demo.css">
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../jquery.easyui.min.js"></script>
</head>
<body>
 <h2>Basic Panel</h2>
 <p>The panel is a container for other components or elements.</p>
 <div style="margin:20px 0 10px 0;">
  <a href="#" class="easyui-linkbutton" onclick="javascript:$('#p').panel('open')">打开</a>
  <a href="#" class="easyui-linkbutton" onclick="javascript:$('#p').panel('close')">关闭</a>
 </div>
 <div id="p" class="easyui-panel" title="Basic Panel" style="width:700px;height:200px;padding:10px;">
  <p style="font-size:14px">jQuery EasyUI framework 基本演示样例</p>
  <ul>
   <li>easyui 是一个基于jquery的用户界面插件集.</li>
   <li>提供易用功能来构造交互式的。javascript的应用.</li>
   <li>不须要写太多javascript代码,通经常使用html定义用户界面.</li>
   <li>支持HTML5.</li>
   <li>easyui 能节约时间.</li>
   <li>easyui 容易使用.</li>
  </ul>
 </div>
</body>
</html>






2 基本手风琴(折叠面板)
<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Basic Accordion - jQuery EasyUI Demo</title>
 <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
 <link rel="stylesheet" type="text/css" href="../themes/icon.css">
 <link rel="stylesheet" type="text/css" href="demo.css">
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../jquery.easyui.min.js"></script>
</head>
<body>
 <h2>Basic Accordion</h2>
 <p>单击面板头部显示内容.</p>
 <div style="margin:20px 0 10px 0;"></div>
 <div class="easyui-accordion" style="width:500px;height:300px;">
  <div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
   <h3 style="color:#0099FF;">手风琴</h3>
   <p>手风琴组件.</p>
  </div>
  <div title="Help" data-options="iconCls:'icon-help'" style="padding:10px;">
   <p>The accordion allows you to provide multiple panels and display one or more at a time. Each panel has built-in support for expanding and collapsing. Clicking on a panel header to expand or collapse that panel body. The panel content can be loaded via ajax by specifying a 'href' property. Users can define a panel to be selected. If it is not specified, then the first panel is taken by default.</p>   
  </div>
  <div title="菜单" data-options="iconCls:'icon-search'" style="padding:10px;">
   <ul class="easyui-tree">
    <li>
     <span>食物</span>
     <ul>
      <li>
       <span>水果</span>
       <ul>
        <li>苹果</li>
        <li>橙子</li>
       </ul>
      </li>
      <li>
       <span>蔬菜</span>
       <ul>
        <li>西红柿</li>
        <li>胡萝卜</li>
        <li>洋白菜</li>
        <li>土豆</li>
        <li>莴苣</li>
       </ul>
      </li>
     </ul>
    </li>
   </ul>
  </div>
 </div>
</body>
</html>






3 基本选项卡
<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Basic Tabs - jQuery EasyUI Demo</title>
 <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
 <link rel="stylesheet" type="text/css" href="../themes/icon.css">
 <link rel="stylesheet" type="text/css" href="demo.css">
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../jquery.easyui.min.js"></script>
</head>
<body>
 <h2>基本选项卡</h2>
 <p>Click tab strip to swap tab panel content.</p>
 <div style="margin:20px 0 10px 0;"></div>
 <div class="easyui-tabs" style="width:700px;height:250px">
  <div title="宠物" style="padding:10px">
   <p style="font-size:14px">jQuery EasyUI framework 选项卡</p>
   <ul>
    <li>小兔子</li>
    <li>小狗狗</li>
    <li>小猫咪</li>
    <li>小萌宠</li>
    <li>XXXXXXXXXXXXX</li>
    <li>YYYYYYYYYYYYY</li>
   </ul>
  </div>
  <div title="My Documents" style="padding:10px">
   <ul class="easyui-tree" data-options="url:'tree_data1.json',method:'get',animate:true"></ul>
  </div>
  <div title="Help" data-options="iconCls:'icon-help',closable:true" style="padding:10px">
   This is the help content.
  </div>
 </div>
</body>
</html>






4 基本布局
<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Basic Layout - jQuery EasyUI Demo</title>
 <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
 <link rel="stylesheet" type="text/css" href="../themes/icon.css">
 <link rel="stylesheet" type="text/css" href="demo.css">
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../jquery.easyui.min.js"></script>
</head>
<body>
 <h2>基本布局</h2>
 <p>布局包含北,南,东,西,中间,部分</p>
 <div style="margin:20px 0;"></div>
 <div class="easyui-layout" style="width:700px;height:350px;">
  <div data-options="region:'north'" style="height:50px"></div>
  <div data-options="region:'south',split:true" style="height:50px;"></div>
  <div data-options="region:'east',split:true" title="东" style="width:100px;"></div>
  <div data-options="region:'west',split:true" title="西" style="width:100px;"></div>
  <div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'">
   <table class="easyui-datagrid"
     data-options="url:'datagrid_data1.json',method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
    <thead>
     <tr>
      <th data-options="field:'itemid'" width="80">Item ID</th>
      <th data-options="field:'productid'" width="100">Product ID</th>
      <th data-options="field:'listprice',align:'right'" width="80">List Price</th>
      <th data-options="field:'unitcost',align:'right'" width="80">Unit Cost</th>
      <th data-options="field:'attr1'" width="150">Attribute</th>
      <th data-options="field:'status',align:'center'" width="60">Status</th>
     </tr>
    </thead>
   </table>
  </div>
 </div>

</body>
</html>




5 基本数据表格
<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Basic DataGrid - jQuery EasyUI Demo</title>
 <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
 <link rel="stylesheet" type="text/css" href="../themes/icon.css">
 <link rel="stylesheet" type="text/css" href="demo.css">
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../jquery.easyui.min.js"></script>
</head>
<body>
 <h2>基本数据表格</h2>
 <p>由html标记创建。不须要javascript代码</p>
 <div style="margin:20px 0;"></div>
 
 <table class="easyui-datagrid" title="基本数据表格" style="width:700px;height:250px"
   data-options="singleSelect:true,collapsible:true,url:'datagrid_data1.json',method:'get'">
  <thead>
   <tr>
    <th data-options="field:'itemid',width:80">Item ID</th>
    <th data-options="field:'productid',width:100">Product</th>
    <th data-options="field:'listprice',width:80,align:'right'">List Price</th>
    <th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
    <th data-options="field:'attr1',width:250">Attribute</th>
    <th data-options="field:'status',width:60,align:'center'">Status</th>
   </tr>
  </thead>
 </table>

</body>
</html>




6 基本对话框
<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Basic Dialog - jQuery EasyUI Demo</title>
 <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
 <link rel="stylesheet" type="text/css" href="../themes/icon.css">
 <link rel="stylesheet" type="text/css" href="demo.css">
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../jquery.easyui.min.js"></script>
</head>
<body>
 <h2>基本对话框</h2>
 <p>单击打开或关闭对话框</p>
 <div style="margin:20px 0;">
  <a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('open')">打开</a>
  <a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('close')">关闭</a>
 </div>
 <div id="dlg" class="easyui-dialog" title="基本 Dialog" data-options="iconCls:'icon-save'" style="width:400px;height:200px;padding:10px">
  有活就干,干完活吃饭。吃完饭睡觉.
 </div>
</body>
</html>




7 基本表单
<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Basic Form - jQuery EasyUI Demo</title>
 <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
 <link rel="stylesheet" type="text/css" href="../themes/icon.css">
 <link rel="stylesheet" type="text/css" href="demo.css">
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../jquery.easyui.min.js"></script>
</head>
<body>
 <h2>基本表单</h2>
 <p>Fill the form and submit it.</p>
 <div style="margin:20px 0;"></div>
 <div class="easyui-panel" title="新主题" style="width:400px">
  <div style="padding:10px 60px 20px 60px">
     <form id="ff" method="post">
      <table cellpadding="5">
       <tr>
        <td>姓名:</td>
        <td><input class="easyui-textbox" type="text" name="name" data-options="required:true"></input></td>
       </tr>
       <tr>
        <td>邮件:</td>
        <td><input class="easyui-textbox" type="text" name="email" data-options="required:true,validType:'email'"></input></td>
       </tr>
       <tr>
        <td>主题:</td>
        <td><input class="easyui-textbox" type="text" name="subject" data-options="required:true"></input></td>
       </tr>
       <tr>
        <td>消息:</td>
        <td><input class="easyui-textbox" name="message" data-options="multiline:true" style="height:60px"></input></td>
       </tr>
       <tr>
        <td>语言:</td>
        <td>
         <select class="easyui-combobox" name="language"><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="zh-cht">Chinese Traditional</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en" selected="selected">English</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="de">German</option><option value="el">Greek</option><option value="ht">Haitian Creole</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="mww">Hmong Daw</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="ko">Korean</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="es">Spanish</option><option value="sv">Swedish</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option></select>
        </td>
       </tr>
      </table>
     </form>
     <div style="text-align:center;padding:5px">
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">清除</a>
     </div>
     </div>
 </div>
 <script>
  function submitForm(){
   $('#ff').form('submit');
  }
  function clearForm(){
   $('#ff').form('clear');
  }
 </script>
</body>
</html>



   

本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标WEB前端jQuery频道!

本文由 @沉沙 发布于职坐标。未经许可,禁止转载。
喜欢 | 0 不喜欢 | 0
看完这篇文章有何感觉?已经有0人表态,0%的人喜欢 快给朋友分享吧~
评论(0)
后参与评论

您输入的评论内容中包含违禁敏感词

我知道了

助您圆梦职场 匹配合适岗位
验证码手机号,获得海同独家IT培训资料
选择就业方向:
人工智能物联网
大数据开发/分析
人工智能Python
Java全栈开发
WEB前端+H5

请输入正确的手机号码

请输入正确的验证码

获取验证码

您今天的短信下发次数太多了,明天再试试吧!

提交

我们会在第一时间安排职业规划师联系您!

您也可以联系我们的职业规划师咨询:

小职老师的微信号:z_zhizuobiao
小职老师的微信号:z_zhizuobiao

版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
 沪公网安备 31011502005948号    

©2015 www.zhizuobiao.com All Rights Reserved

208小时内训课程