今天你学习了吗?本篇实例是关于easyui添加功能,特别需要注意的是,ID为dlg其class名。其余的自行对照自己的项目进行调整。
<div id="dlg" class="easyui-dialog" style="z-Index: 100px;" fit="true" style="height:500px" closed="true" buttons="#dlg-buttons" modal="true">
<div style="100%;height:30px;"></div>
<form id="fm" method="post" novalidate minimizable>
<table width="260" border="0" align="center" cellpadding="3" >
<input type="hidden" name="category_id" id="category_id" />
<tr>
<td align="right">
<label style="font-family:宋体;">
分类名称:</label></td>
<td><input type="text" name="category_name" id="category_name" class="easyui-validatebox" data-options="required:true"/>
<span class="x">*</span>
</td>
</tr>
<tr>
<td align="right">
<label style="font-family:宋体;">
会员折扣%:</label></td>
<td><input type="text" name="category_vip" id="category_vip" class="easyui-validatebox" data-options="required:true"/>
<span class="x">*</span>
</td>
</tr>
<tr>
<td align="right">
<label style="font-family:宋体;">
代理商折扣%:</label></td>
<td><input type="text" name="category_agde" id="category_agde" class="easyui-validatebox" data-options="required:true"/>
<span class="x">*</span>
</td>
</tr>
<tr>
<td align="right">
<label style="font-family:宋体;">
供销商折扣%:</label></td>
<td><input type="text" name="category_deco" id="category_deco" class="easyui-validatebox" data-options="required:true"/>
<span class="x">*</span>
</td>
</tr>
<tr>
<td align="right">
<label style="font-family:宋体;">
分类示意图:</label></td>
<td><input type="text" name="category_image" id="category_image" class="easyui-validatebox" data-options="required:true"/>
<span class="x">*</span>
</td>
</tr>
</table>
</form>
<!-- 弹出框按钮 -->
<hr style="height:1px;border:none;border-top:1px solid rgb(238, 244, 255);" ></hr>
<center>
<a href="javascript:void(0)" id="updatebut" class="easyui-linkbutton my-dialog-button" plain="true" icon="icon-ok" onclick="saveE dit2()" iconcls="icon-save">确定</a>
<a href="javascript:void(0)" class="easyui-linkbutton my-dialog-button" plain="true" onclick="javascript:$('#dlg').dialog('close ')"iconcls="icon-cancel">取消</a>
</center>
</div>