多图片上传时如何给每张图片添加描述信息---散分题
我找了好多,都跟我的不符合
麻烦大家了
HTML-------------------------
<%@ Page Language= "C# " AutoEventWireup= "true " CodeFile= "Default.aspx.cs " Inherits= "_Default " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN " "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head runat= "server ">
<title> 多文件上传 </title>
<script language= "JavaScript ">
function addFile()
{
var str = ' <INPUT type= "file " size= "200px " NAME= "File "> '
var strtxt= ' <input type= "text " size= "100px " name= "txtFile " /> '
document.getElementById( 'MyFile ').insertAdjacentHTML( "beforeEnd ",str)
document.getElementById( 'MyFile ').insertAdjacentHTML( "beforeEnd ",strtxt)
}
</script>
</head>
<body>
<form id= "form1 " runat= "server ">
<asp:ScriptManager ID= "ScriptManager1 " runat= "server " />
<div>
<h3> 多文件上传 </h3>
<P id= "MyFile " style= "background-color:Burlywood;width:400px ">
<INPUT id= "fileLoad " type= "file " runat= "server " NAME= "File "> <br />
图片描述: <input id= "txtCaption " type= "text " name= "txtFile " runat= "server " />
</P>
<P>
<input type= "button " value= "增加(Add) " onclick= "addFile() ">
<input onclick= "this.form.reset() " type= "button " value= "重置(ReSet) ">
<asp:Button Runat= "server " Text= "开始上传 " ID= "UploadButton " OnClick= "UploadButton_Click "> </asp:Button>