html中实现添加输入框怎么实现?
譬如:
以前的QQ上传照片当你点击上传时会出现5个输入框,在这个输入框中你可以选择照片的路径.当还有照片要上传时就点击添加,便会再出现一个输入框你可以再输入5张照片的地址.这个怎么实现啊?有没有代码?
再发个兼容ff的:
JScript code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
var divfiles;
function addFileInput() {
divfiles=document.getElementById("divfiles");
var filesCount=divfiles.childNodes.length;
if(filesCount==1) {
document.getElementById("remove").style.visibility="visible";
} else if(filesCount==4) {
document.getElementById("add").style.visibility="hidden";
}
var fileInput="<div>第"+(filesCount+1)+"个文件:<input name=\"myfile\" type=\"file\"/></div>";
divfiles.insertAdjacentHTML("beforeEnd",fileInput);
}
function removeLastInput() {
var filesCount=divfiles.childNodes.length;
if(filesCount==2) {
document.getElementById("remove").style.visibility="hidden";
} else if(filesCount
相关问答:
我用object标签载入一个外部的html文件可是用vs2008打开却不显示,显示红叉,请问是怎么回事?
用iframe载入。
可以用iframe载入
用iframe载入超链接地址不改变,没办法跳转页面
引用
用iframe载入超链接地址 ......
网页中嵌入一个ActiveX,怎样使用<param>指定字体?
如下:
<OBJECT ID="AX" CLASSID="CLSID:986E24CA-ABCD-1234-5678-04C63B177FB0">
<param name="Font" value=& ......
<select name="sel" onselect="???" >
<option value="768">768Kbps</option>
<option value="512" selected>512Kbps< ......
如何在不删除如下代码的情况下实现图片随鼠标的滚动而滚动?
代码:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt ......