1/a.jspjavascript
<div id="dd" class="easyui-dialog" style="width: 650px; padding: 10px 20px; height: 330px;" closed="true" buttons="#footer" modal="true"></div>java
2/b.jspjsp
<form id="fm" method="post" action="" style="margin-top: 20px; margin-left: 20px;">
<table id="xm3" class="tab">
<tr>
<td style="width:80px"> 部 門</td>
<td> <input id="orgName" name="orgName" style="float:right" class="easyui-textbox" editable="false" /></td>
<td style="width:80px"> 工 號</td>
<td><input id="stuCode" name="stuCode" class="easyui-textbox" /></td>
</tr>
<tr>
<td style="width:80px">姓 名</td>
<td><input id="stuName" name="stuName" class="easyui-textbox" /> </td>
<td style="width:80px"> 性 別 </td>
<td >
<span class="radioSpan">
<input type="radio" id="sex" name="sex" value="1">男</input>
<input type="radio" id="sex" name="sex" value="2">女</input>
</span>
</td>
</tr>
<tr>
<td style="width:80px"> 民 族 </td>
<td>
<select class="easyui-combobox" id="nation" name="nation" style="width:150px;">
<option value="1">漢族</option>
<option value="2">其餘民族</option>
</select>
</td>
<td style="width:80px"> 入學時間</td>
<td>
<input id="stuInDate" name="stuInDate" class="easyui-datebox"
data-options="formatter:myformatter,parser:myparser" >
</td>
</tr>
<tr>post
<td style="width:80px"> 聯繫電話</td>
<td><input id="phone" name="telphone" class="easyui-textbox"/></td>
<td style="width:80px"> 聯繫地址</td>
<td> <input id="address" name="address" class="easyui-textbox" /></td>
</tr>
<tr>
<td style="width:80px"> 添加備註</td>
<td colspan="3"> <input id="comments" style="width: 410px; height: 65px;" class="easyui-textbox" data-options="multiline:true" /></td>
</tr>
<tr>
<td><input id="orgId" name="orgId" type="hidden"></input></td>
</tr>
<tr>
<td colspan="3"></td>
<td>
<a id="confirm" href="javascript:Modify()" class="easyui-linkbutton c6" iconcls="icon-ok" style="width: 90px">提交</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#dd').dialog('close')" style="width: 90px">取消</a>
</td>
</tr>
</table>
</form>ui
3/ a.jsp的js方法:spa
$('#dd').dialog({
left:"250px",
top:"150px",
title: '添加學生',
inline:false,
closed:true,
cache: false,
buttons:"#footer",
shadow:false,
modal: true ,
href:'./astumag/addUser.jsp',
onLoad:function(){ orm
//onLoad:是面板panel的,onOpen:有些也能夠,但這裏不能用ip
//textbox能夠成功賦值 ,可是不知爲啥用$('#orgName').val(value)卻又不能賦值
$('#orgName').textbox('setValue',value);
//爲何textbox不行???是由於他的type是hidden!!!
$('#orgId').val(orgSelect.orgId);
}
});
$('#dd').dialog("open");input