<title> multi-File upload </title>
<style>
. lbtn
. ist
</style>
<script language= "JavaScript" >
function Check ()
{
var icnt = Document.frm1.cnt.value
var name;
for (i=0;i<icnt;i++)
{
Name = eval ("Document.frm1.name" +i+ ". Value");
if (Name==null | | name== "")
{
var num = i+1;
Alert ("The first" +num+ "blank, please fill in the content");
Break
}
}
if (i==icnt)
{
Document.frm1.submit ();
Document.body.innerhtml= "Uploading Please wait!.... www.111cn.net";
}
}
var i=0;
Function Show (obj,i)
{
var str;
var name;
var value;
var Xa=this.value;
str = Obj.value;
Name = Str.split ("");
Name = Name.pop ();
Name = Name.split (".");
value = Document.frm1;
Value = Value.name (i);
Document.frm1.cnt.value = name[0];
alert (Document.frm1.name33.value);
Eval ("Alert (document.frm1.name" +i+ ". Value)");
Eval ("Document.frm1.name" +i+ ". value=name[0]");
return 1;
}
function Create ()
{
var sfrm = document.frm1.innerhtml;
var icnt = Cnt.value;
var num;
for (j=0;j<icnt;j++)
{
num=i+1;
if (Num < 10)
{
num= "0" +num;
}
SFRM = sfrm + "Please select File" +num+ "<input type=file name= ' file" +i+ "' onchange= ' show (This," +i+ ") ' class=ist> ';
SFRM = sfrm + "song name: <input type=text name= ' name" +i+ "' value= '" class=ist> ";
SFRM = sfrm + "<br>";
i++;
}
document.frm1.innerhtml = sfrm;
Document.frm1.cnt.value=i;
}
</script>
<body class=lbtn onload= "Document.frm1.cnt.value=cnt.value;" >
Please enter the number of files to upload: <input type=text name=cnt value= "class=ist onchange=" "Document.frm1.cnt.value=this.value;" >
<input Type=button name=bt1 value= "Generate Upload File box" onclick= "Create ();" Class=lbtn><p><center>
<input Type=button name=bt1 value= "Upload" onclick= "check ();" Class=lbtn>
<input Type=button name=bt1 value= "Clear onclick=" document.location.reload (); "Class=lbtn>
<form id= "Frm1" Name=frm1 method= "Post enctype=" Multipart/form-data "action="./upload.php Tutorials ">
<input Type=hidden name=cnt value= "Ten" class=ist>
</form>
<input Type=button name=bt1 value= "Upload" onclick= "check ();" Class=lbtn>
<input Type=button name=bt1 value= "Clear onclick=" document.location.reload (); "Class=lbtn>
</body>
<form id= "Frm1" Name=frm1 method= "post" enctype= "Multipart/form-data" action= "./upload.php" >
<input Type=hidden name=cnt value= "Ten" class=ist>
</form>
<input Type=button name=bt1 value= "Upload" onclick= "check ();" Class=lbtn>
<input Type=button name=bt1 value= "Clear onclick=" document.location.reload (); "Class=lbtn>
</body>