Javascript:如何打开包含参数字段的表单?
我想打开一个表单,表单的字段中填充了与某个记录对应的数据 例如:Javascript:如何打开包含参数字段的表单?,javascript,jstl,Javascript,Jstl,我想打开一个表单,表单的字段中填充了与某个记录对应的数据 例如: 以某种形式出现: 狗 所有这些东西都正常工作。 如何将狗的数据传递到要显示的表单?正如您可能看到的,我在SessionScope中有一组“dog”对象。谢谢你的帮助 Jquery有一个函数,可以实现您想要的功能 <table id="tabledogs" class="ui-widget ui-widget-content"> <thead>
- 以某种形式出现:
狗
- 所有这些东西都正常工作。 如何将狗的数据传递到要显示的表单?正如您可能看到的,我在SessionScope中有一组“dog”对象。谢谢你的帮助李>
<table id="tabledogs" class="ui-widget ui-widget-content"> <thead> <tr class="ui-widget-header "> <th>ID</th> <th>Name</th> <th>Action</th> </tr> </thead> <tbody> <c:forEach var="dog" items="${sessionScope.dogs}"> <tr> <td width="50%" align="left">${dog.id}</td> <td width="50%" align="left">${dog.name </td> <td><button id="update">Update</button> </td> </tr> </c:forEach> </tbody> </table> </div>
<form> <fieldset> <label for="id">ID</label> <input type="text" name="id" id="id" class="text ui-widget-content ui-corner-all" /> <label for="name">Name</label> <input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" /> </fieldset> </form> </div>
$("#update").button().click(function() { $("#dialog-form").dialog("open"); });