截取的一段代码:
function MakeVideo()
{
var startNum = 2;
var Videolist = document.getElementById("Videolist");
var endNum = document.form1.videonum.value;
if(endNum>100) endNum = 100;
Videolist.innerHTML = "";
for(startNum;startNum<=endNum;startNum++){
Videolist.innerHTML += "<input name=\"videoname["+startNum+"]\" type=\"text\" id=\"videoname"+startNum+"\" value=\"第"+startNum+"集\" size=\"10\" /> \r\n";
Videolist.innerHTML += "<input type=\"text\" id=\"videourl"+startNum+"\" name=\"videourl["+startNum+"]\" value=\"\" style=\"width:250px\"/>\r\n";
Videolist.innerHTML += "<input name=\"sel"+startNum+"\" type=\"button\" id=\"sel"+startNum+"\" value=\"选取\" onclick=\"SelectMedia('form1.videourl"+startNum+"')\" class=\"inputbut\" /><br/>\r\n";
}
}
<td class="bline">集数设置:
<input name="videonum" type="text" id="videonum" value="5" size="5" />
<input type="button" name="button2" id="button2" onClick="MakeVideo();" value="提交" class="inputbut"/></td>
</tr>
</table></td>
</tr><tr>
<td width="90" class="bline" height='24'> 视频列表:</td>
<td class="bline">
<input name="videoname[1]" type="text" id="videoname1" value="第1集" size="10" />
<input type="text" id="videourl1" name="videourl[1]" value="http://" style="width:250px"/>
<input name="sel1" type="button" id="sel1" value="选取" onClick="SelectMedia('form1.videourl1')" class="inputbut" />
<div id="Videolist"></div> </td>
</tr>
说明:这个实现的是按那提交出现这个样式的。
我想让这个
可以替换成这个样子的:
摆弄了好几天了。。但是一直不会。不知道那个源码可以怎么弄。js的也可以。谢谢各位大大了。。
function MakeVideo()
{
var startNum = 2;
var Videolist = document.getElementById("Videolist");
var endNum = document.form1.videonum.value;
if(endNum>100) endNum = 100;
Videolist.innerHTML = "";
for(startNum;startNum<=endNum;startNum++){
Videolist.innerHTML += "<input name=\"videoname["+startNum+"]\" type=\"text\" id=\"videoname"+startNum+"\" value=\"第"+startNum+"集\" size=\"10\" /> \r\n";
Videolist.innerHTML += "<input type=\"text\" id=\"videourl"+startNum+"\" name=\"videourl["+startNum+"]\" value=\"\" style=\"width:250px\"/>\r\n";
Videolist.innerHTML += "<input name=\"sel"+startNum+"\" type=\"button\" id=\"sel"+startNum+"\" value=\"选取\" onclick=\"SelectMedia('form1.videourl"+startNum+"')\" class=\"inputbut\" /><br/>\r\n";
}
}
<td class="bline">集数设置:
<input name="videonum" type="text" id="videonum" value="5" size="5" />
<input type="button" name="button2" id="button2" onClick="MakeVideo();" value="提交" class="inputbut"/></td>
</tr>
</table></td>
</tr><tr>
<td width="90" class="bline" height='24'> 视频列表:</td>
<td class="bline">
<input name="videoname[1]" type="text" id="videoname1" value="第1集" size="10" />
<input type="text" id="videourl1" name="videourl[1]" value="http://" style="width:250px"/>
<input name="sel1" type="button" id="sel1" value="选取" onClick="SelectMedia('form1.videourl1')" class="inputbut" />
<div id="Videolist"></div> </td>
</tr>
说明:这个实现的是按那提交出现这个样式的。
我想让这个
可以替换成这个样子的:
摆弄了好几天了。。但是一直不会。不知道那个源码可以怎么弄。js的也可以。谢谢各位大大了。。
<table>
<tr>
<td class="bline">集数设置:
<input name="videonum" type="text" id="videonum" value="5" size="5" />
<input type="button" name="button2" id="button2" onClick="MakeVideo();" value="提交" class="inputbut"/></td>
</tr>
</table>
</td>
</tr> <tr>
<td width="90" class="bline" height='24'> 视频列表:</td>
<td class="bline">
<input name="videoname[1]" type="text" id="videoname1" value="第1集" size="10" />
<input type="text" id="videourl1" name="videourl[1]" value="http://" style="width:250px"/>
<input name="sel1" type="button" id="sel1" value="选取" onClick="SelectMedia('form1.videourl1')" class="inputbut" />
<div id="Videolist"></div> </td>
</tr>
</form>