<body>
<input type="button" value="添加" onClick="addRow();" />
<input type="button" value="删除" onClick="removeRow();" />
<form action="addKT.action">
<table border="1" cellpadding="0" cellspacing="0" id="senfe">
<tr>
<td colspan="4">题目1:<input type="text" name="tm"/></td>
</tr>
<tr>
<td colspan="4">答案:<select name="da" style="width:100px"><option value="A">A</option><option value="B">B</option><option value="C">C</option><option value="D">D</option></select></td>
</tr>
<tr>
<td>A:</td><td ><input type="text" name="xxa"/></td>
<td>B:</td><td ><input type="text" name="xxb"/></td>
</tr>
<tr>
<td>C:</td><td ><input type="text" name="xxc"/></td>
<td>D:</td><td ><input type="text" name="xxd"/></td>
</tr>
</table>
</form>
</body>点击添加按钮的时候增加三行<tr>,内容跟这一样。就是加一道题
点删除的时候删除<tr>,删一道题
点保存,所有的都给后台保存,怎么搞??struts映射的话怎么配置??不用struts的话还有啥办法实现?新手求指教
<input type="button" value="添加" onClick="addRow();" />
<input type="button" value="删除" onClick="removeRow();" />
<form action="addKT.action">
<table border="1" cellpadding="0" cellspacing="0" id="senfe">
<tr>
<td colspan="4">题目1:<input type="text" name="tm"/></td>
</tr>
<tr>
<td colspan="4">答案:<select name="da" style="width:100px"><option value="A">A</option><option value="B">B</option><option value="C">C</option><option value="D">D</option></select></td>
</tr>
<tr>
<td>A:</td><td ><input type="text" name="xxa"/></td>
<td>B:</td><td ><input type="text" name="xxb"/></td>
</tr>
<tr>
<td>C:</td><td ><input type="text" name="xxc"/></td>
<td>D:</td><td ><input type="text" name="xxd"/></td>
</tr>
</table>
</form>
</body>点击添加按钮的时候增加三行<tr>,内容跟这一样。就是加一道题
点删除的时候删除<tr>,删一道题
点保存,所有的都给后台保存,怎么搞??struts映射的话怎么配置??不用struts的话还有啥办法实现?新手求指教
解决方案 »
- jsp提交表单时,action不执行set方法,导致action取不到页面传来的值
- 配置CAS错误No Certificate file specified or invalid file format
- Java有连接池池之后还有必要把取数据库连接放在类的外面吗
- javamail linux下不能发送的问题
- 高分求救,firefox,jsp文件上传
- Hibernate的一对多自关联中的级联删除问题
- java.io.CharConversionException: isHexDigit
- 高手请进:请问如何用java实现动态webservice客户端
- 关于WebService的问题
- 高分请教在JbuilderX中使用CrystalReportViewer出现Error finding JNDI name的问题
- java写的web程序在自己的电脑运行有问题,在别人的电脑运行没问题是怎么回事?
- 在网页中嵌入经xsl编译后的xml
String[] das = request.getParameterValues("da");这样就能获取到所有的值