http://lucky.myrice.com/javascriptexam/index.html

解决方案 »

  1.   

    give me your email
    i send it to u
      

  2.   

    To: alexander_lin(求知无限) [email protected]
      

  3.   

    http://www.lostinet.com/public/lostinet_Upload/e.g.jscript.form.asphttp://www.lostinet.com/public/
      

  4.   

    你试试看这个<HTML>
    <HEAD>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title></title>
    <script language="JavaScript">
     function addFile()
    {
    oRow=document.all.tableID.insertRow();
    oCell=oRow.insertCell();
    oCell.innerHTML="<input type='file' name='txtimage' size='50' value=''>";
     }
    </script>
    </HEAD>
    <BODY style="border:0" bgcolor="D4d0c8">
    <div style="padding:3 3"><input type="button" name="Button" value=" 添 加 " class="p9" onclick="addFile()">&nbsp;<input type="button" name="Button" value=" 粘 贴 " onclick="document.all.frm1.submit()"></div>
    <fieldset>
    <div style="height:expression(document.body.offsetHeight-80);overflow:auto;">
    <table cellpadding="0" cellspacing="0" border="0" width="471" id="tableID" bordercolordark="#FFFFFF" bordercolorlight="CCCCCC" frame=void>
    <form action=SysUpload_Select.asp method=post  name="frm1" target="_self">
      <tr> 
        <td> 
          <input type="file" name="txtimage" size="50" value=''>
        </td>
      </tr></form>
    </table>
    </div>
    </fieldset>
    </BODY>
    </HTML>
      

  5.   

    我这里有动态上传文件的代码和我联系..
    [email protected]
      

  6.   

    <HTML>
    <HEAD>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
    <link rel="stylesheet" href="../css/pagestyle.css" type="text/css">
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <br>
    <br>
    <form name="form1" method="post" action="" enctype="multipart/form-data">
    <input type="hidden" name="AttachmentFiles" value="1">
    <input type="hidden" name="Test" value="@@@@@@@@">
    <input type="hidden" name="FileUploadStart">
      <table width="100%" border="1" cellspacing="1" cellpadding="1" id="FileTable">
        <tr bgcolor="#eeeeee"> 
          <td width="21%" height="25"><b>Attachment </b></td>
          <td width="79%" height="25"><b>Res</b></td>
        </tr>
        <tr> 
          <td width="21%" align="right">
             <input type="file" name="file_1" size="50" class="input_darkred" style="width:350;cursor:hand">
          </td>
          <td width="79%"> 
            <textarea name="Res_1" cols="50" class="input" rows="3"></textarea>
          </td>
        </tr>
        <tr align="center"> 
          <td colspan="2" height="50"> 
            <input type="button" name="Add" value="Add More" class="btn_DarkRed" style="width:120;cursor:hand" onclick="javascript:AddMoreAttachment()">
            <input type="button" name="Upload" value="Upload" class="btn_DarkRed" style="width:60;cursor:hand" onclick="javascript:GoUpload()">
          </td>
        </tr>
      </table>
    </form>
    </BODY>
    </HTML>
    <script language=javascript src="../Functions/functions.js"></script>
    <script language=vbscript src="../Functions/functions.vbs"></script>
    <script language="javascript">
    <!--
    function AddTableRows(TableName,Rows,CellNumber,ArrRowsHTML,ArrAlign,ArrColspan,FileNumber,oTmpFileNumber){
       var oTable=eval(TableName);
       // From row(s) to start insert..
       var FromRow=oTable.rows.length-parseInt(Rows);
       var oFromRow=oTable.insertRow(FromRow);
       // retrieve the rows collection for the table.
       var oRows=oTable.rows;
       // retrieve the cells collection for the first row.
       var oCells=oFromRow.cells;
       try{
    for(I=1;I<=CellNumber;I++){
       var oCell=oRows(oFromRow.rowIndex).insertCell(oCells.length);
       oCell.height="25";
       oCell.align=ArrAlign[I-1];
       oCell.colSpan=ArrColspan[I-1];
       oCell.innerHTML=ArrRowsHTML[I-1];
    }
       }
       catch(e)
       {
         alert(e.description);
         oTable.deleteRow(oTable.rows.length-parseInt(Rows)-1)
         return false;
       }
       oTmpFileNumber.value=FileNumber+1;
    }
    function AddMoreAttachment(){
    var AttachmentFiles=parseInt(document.form1.AttachmentFiles.value);
    var TmpValue=AttachmentFiles+1
    var oTmpFileNumber=document.form1.AttachmentFiles;
    var CellNumber=2;
    var ArrRowsHTML = new Array();
    var ArrAlign = new Array();
    var ArrColspan = new Array();
        ArrRowsHTML[0]="<input type=\"file\" name=\"file_" +TmpValue +"\"  size=\"50\" class=\"input_darkred\" style=\"width:350;cursor:hand\">";
        ArrRowsHTML[1]="<textarea name=\"Res_" + TmpValue +"\" cols=\"50\" class=\"input\" rows=\"3\"></textarea>";
    ArrAlign[0]="left";
    ArrAlign[1]="left";
    ArrColspan[0]=1;
    ArrColspan[1]=1;
    AddTableRows("FileTable",1,2,ArrRowsHTML,ArrAlign,ArrColspan,AttachmentFiles,oTmpFileNumber);
    }
    function CheckData(){
        var AttachmentFiles=parseInt(document.form1.AttachmentFiles.value);
    for(I=1;I<=AttachmentFiles;I++){
        var tmpFile=eval("document.form1.file_"+I);
    if(typeof(tmpFile)=="object"){
        var tmpFileName=tmpFile.value.Trim();
    if(tmpFileName==""){
       alert("Please select  attachment for upload.");
       return false;
    }
    break;
    }
    }
        return true;
    }
    function GoUpload(){
       if(CheckData()&&(confirm("Confirm to upload?"))){
          document.form1.action="Upload.asp"
          document.form1.submit();
       }
       
    }
    //-->
    </script>
      

  7.   

    接着问一下,能不能在所加的FILE后面加一个删除,点删除、就删除当行的那个<input type='file'>呢
      

  8.   

    to kaney00(kaney00)
    当然可以..
    elementname.removeNode..
    或者针对表格行用
    deleteRow
      

  9.   

    我 用 的deleteRow()总是删除第一个,这么才能删除我 所制定的那个file