jquery form 加载数据
来源:互联网 发布:单片机的类型 编辑:程序博客网 时间:2024/05/16 07:15
部分代码如下<form id="fm" method="post" novalidate> <div style="height:26px" class="fitem"> <label>区域:</label> <input class="easyui-combobox" id="areaId" name="areaId" url="getAreasList" //可以从后台得到数据 valueField="id" textField="name" panelHeight="auto" /> </div> <div style="height:26px" class="fitem"> <label>名称:</label> <input id="devName" name="name" class="easyui-validatebox" missingMessage="不允许空" required="true" /> </div>后面的省略部分js代码var row = $('#dg').datagrid('getSelected');
$('#fm').form('load',row);fm:form标签的idrow:得到的一条数据一个对象,easyui中选中一条数据 form中数据接收用<input name="row对应的属性名"/>
0 0