精通jQuery EasyUI

[b]web管理系统中,不可避免的要画各种界面,jsp最近几年的发展貌似不是很给力,于是把目前投向了其它的开源免费软件,经过寻寻觅觅和各种实验,发现jQuery EasyUI非常给力,值得为大家推广。举个简单例子,datagrid相信服务端开发人员都用到过,专门用来展示数据列表的,若是jsp,需要如下代码:
[/b]

<div class="sortable">
<div class="box span12">
<div class="box-header well" >
<h2>数据列表</h2>
</div>
<div class="box-content">
<table class="table table-bordered table-striped">
<thead>
<tr>

<td>Item ID</td>
<td>ProductId</td>
<td>ListPrice</td>
<td>UnitCost</td>
<td>Atrr1</td>
<td>status</td>
</tr>
</thead>
<c:forEach items="${productList}" var="product">
<tr>
<td>${product.itemid }</td> <td>${product.productid }</td> <td>${product.listprice }</td>
<td>${product.unitcost }</td> <td>${product.attr1 }</td> <td>${product.status}</td>

</tr>
</c:forEach>
</table>
${pageHtml }
</div>
</div>
</div>


[b]相信这段代码大家都很熟悉,那么jQuery EasyUI只需要如下代码就可以了:[/b]

<table class="easyui-datagrid" title="Basic DataGrid" 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">ProductId</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>


[b]是不是简洁了很多?

另外jQuery EasyUI还提供了其它很多很给力的功能,如:datagrid列编辑、行编辑等,最重要的是它开放源代码(官网:http://www.jeasyui.com/index.php),再简单掌握一下常用的jquery语法,那么绝大部分的web支撑管理系统的前台界面都可以搞定了。[/b]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值