Jquery form loading data example

  • 2020-03-30 02:39:58
  • OfStack

Part of the code is as follows
 
<form id="fm" method="post" novalidate> 
<div style="height:26px" class="fitem"> 
<label> area :</label> 
<input class="easyui-combobox" 
id="areaId" 
name="areaId" 
url="getAreasList" //You can get data from the background
valueField="id" 
textField="name" 
panelHeight="auto" 
/> 
</div> 
<div style="height:26px" class="fitem"> 
<label> The name of the :</label> 
<input id="devName" name="name" class="easyui-validatebox" missingMessage=" Do not allow empty " required="true" /> 
</div> 

Subsequent omission

Partial js code
 
<pre code_snippet_id="229232" snippet_file_name="blog_20140311_1_960217" name="code" class="html"><pre code_snippet_id="229232" snippet_file_name="blog_20140311_1_960217" name="code" class="html">var row = $('#dg').datagrid('getSelected'); 
</pre> 
<pre></pre> 
<pre code_snippet_id="229232" snippet_file_name="blog_20140311_2_8342494" name="code" class="html">$('#fm').form('load',row); 
fm : form Of the label id 
row : a piece of data an object, easyui Select one of the data  
form For data reception <input name="row The corresponding property name "/> 
</pre><br> 
<pre></pre> 
<br> 
<br> 
</pre> 

Related articles: