Jquery easyui reset button, easyui clears the form, Jquery easyui resets the form

Jquery easyui reset button, easyui clears the form, Jquery easyui resets the form

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

©Copyright Sweet Potato Yao February 16, 2017

http://fanshuyao.iteye.com/

 

First, the page form code

<form id="searchForm">
    <span class="ib third">
	Loan contract number:
	<input class="f1 easyui-textbox jtrim" id="loanContractCode" name="loanContractCode"/>
    </span>
    <span class="ib third">
	Borrower:
	<input class="easyui-combobox jtrim w250" id="lendUnitId" name="lendUnitId"
	data-options="
		editable : true,
		multiple : false,
		valueField : 'orgId',
		textField : 'orgName',
		url : 'path/getListOrgUnit?orgType=0',
		method : 'get',
		panelHeight: 'auto'
	"/>
    </span>
    <span class="ib third">
	Withdrawal Deadline: From
	<input class="easyui-datebox w100" id="drawEndtimeStart" name="drawEndtimeStart" data-options="required:false"/>
	arrive
	<input class="easyui-datebox w100" id="drawEndtimeEnd" name="drawEndtimeEnd" data-options="required:false"/>
    </span>
</form>

 

2. js reset form method

/**
 * Easyui reset form
 * @param formId
 */
function resetForm(formId){
	$('#'+formId).form('clear');
};

 

3. Call the reset method

 

The searchForm in onclick="resetForm('searchForm')" is the id of the form

<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-reset"
	plain="true" onclick="resetForm('searchForm')">重置</a>

 

 

 

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

©Copyright Sweet Potato Yao February 16, 2017

http://fanshuyao.iteye.com/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327007091&siteId=291194637