<%@ page contentType="text/html; charset=GBK" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title></title> <script type="text/javascript">
function addMore(){
var td=document.getElementById("more");
var br=document.createElement("br");
var input=document.createElement("input");
var button=document.createElement("input");
input.type="file";
input.name="upload";
button.type="button";
button.value="移除"; button.onclick=function(){
td.removeChild(br);
td.removeChild(input);
td.removeChild(button);
} td.appendChild(br);
td.appendChild(input);
td.appendChild(button); } </script>
</head>
<body>
<form method="post" name="aform" enctype="multipart/form-data"> <table width="95%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#6785A7"> <tr>
<td bgcolor="#F6F6F6" >上传附件</td>
<td id=more bgcolor="#FFFFFF"><input type=file name=upload ><input type=button value='更多' onclick=addMore()></td>
<td bgcolor="#FFFFFF">附加内容</td>
<td bgcolor="#FFFFFF"><input type="text" name="countent" ></td>
</tr>
</table>
</form>
</body>
</html>
现在是点击更多的时候会在上传附件输入框下面出现一列一列
我现在想实现的是当点击 更多的时候 重新
出现一个 <tr></tr>的格式 意思想同时列出上传的内容
<tr>
<td bgcolor="#F6F6F6" >上传附件</td>
<td id=more bgcolor="#FFFFFF"><input type=file name=upload ><input type=button value='更多' onclick=addMore()></td>
<td bgcolor="#FFFFFF">附加内容</td>
<td bgcolor="#FFFFFF"><input type="text" name="countent" ></td>
</tr>
这样的形式增加和移除
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title></title> <script type="text/javascript">
function addMore(){
var td=document.getElementById("more");
var br=document.createElement("br");
var input=document.createElement("input");
var button=document.createElement("input");
input.type="file";
input.name="upload";
button.type="button";
button.value="移除"; button.onclick=function(){
td.removeChild(br);
td.removeChild(input);
td.removeChild(button);
} td.appendChild(br);
td.appendChild(input);
td.appendChild(button); } </script>
</head>
<body>
<form method="post" name="aform" enctype="multipart/form-data"> <table width="95%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#6785A7"> <tr>
<td bgcolor="#F6F6F6" >上传附件</td>
<td id=more bgcolor="#FFFFFF"><input type=file name=upload ><input type=button value='更多' onclick=addMore()></td>
<td bgcolor="#FFFFFF">附加内容</td>
<td bgcolor="#FFFFFF"><input type="text" name="countent" ></td>
</tr>
</table>
</form>
</body>
</html>
现在是点击更多的时候会在上传附件输入框下面出现一列一列
我现在想实现的是当点击 更多的时候 重新
出现一个 <tr></tr>的格式 意思想同时列出上传的内容
<tr>
<td bgcolor="#F6F6F6" >上传附件</td>
<td id=more bgcolor="#FFFFFF"><input type=file name=upload ><input type=button value='更多' onclick=addMore()></td>
<td bgcolor="#FFFFFF">附加内容</td>
<td bgcolor="#FFFFFF"><input type="text" name="countent" ></td>
</tr>
这样的形式增加和移除
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货