5月31日

通过实验学习到一种ajax方法,

通过表格的隐藏和显示来弹出需要的对话框来达到填报表单的目的。

<div id="UpdateDiv" style="display: hidden">
<form id="UpdateForm">
<table style=" 350px;" id="UpdateTable">
<tr>
<th width="30%">学号:</th>
<td width="70%" class="ltd"><input name="id" type="hidden" id="UpdateId"><input name="bookname" type="text" id="UpdateNo"></td>
</tr>
</tr>
<tr>
<th>姓名:</th>
<td class="ltd"><input name="author" type="text" id="UpdateName"></td>
</tr>
<tr>
<th>性别:</th>
<td class="ltd"><input name="price" type="text" id="UpdateSex"></td>
</tr>
<tr>
<th>出生日期:</th>
<td class="ltd"><input name="author" type="text" id="UpdateBr"></td>
</tr>
<tr>
<th>住址:</th>
<td class="ltd"><input name="author" type="text" id="UpdateZz"></td>
</tr>
<tr>
<th colspan="2"><input type="button" value="添加" id ="UpdateSubmit"> <input
type="reset" value="重置"></th>
</tr>
</table>
</form>
<span style="color:red;" id="UpdateTip"></span>
</div>

通过$("#UpdateDiv").dialog("open");在点击函数里书写这样的方法,来使窗口显现。

原文地址:https://www.cnblogs.com/buyaoya-pingdao/p/14862777.html