JS Batch Upload Interface Implementation _ form effects

Source: Internet
Author: User
1. Download plugin upload quickly.
2. HTML upload control with limited upload.

I'm going to use JavaScript scripts to implement 2 of the functionality below.

1. Dynamically increase the upload control.
2. Delete the upload control dynamically.
3. Restrict users from entering the path in the upload control.
<ptml> <pead> <meta http-equiv= "Content-type" content= "text/html" > <title>locale photo</t itle> <script> function Addmorerow () {var orow=event.srcelement.parentnode.parentnode; var Otable=orow.parentnode.parentnode; Onewrow=otable.insertrow (); for (i=0;i<orow.cells.length;i++) {Onewrow.insertcell (). innerhtml=orow.cells[i].innerhtml; } orow.all ("Delbtn"). Disabled=false; Onewrow.all ("Delbtn"). Disabled=false; function Deletemorerow () {var orow=event.srcelement.parentnode.parentnode; var Otable=orow.parentnode.parentnode; if (otable.rows.length>1) {otable.deleterow (orow.rowindex); if (otable.rows.length==1) {Otable.all ("delbtn"). Disabled=true; }} function Disabledkeyinput () {if (event.keycode!=8&&event.keycode!=46) {Event.ret Urnvalue=false; }} </script> </pead> <body topmargin= "A" > <form method= "Post" enctype= "Multipart/form-data" > <table><th> bulk Upload </th></table> <table> <tr> <td nowrap= "nowrap" > Name *</td> <td><input type = "text" name= "name" size= "maxlength=" ></td> <td nowrap= "nowrap" > File path *</td> <td> <input type= "File" Name= "FilePath" size= "onkeydown=" Disabledkeyinput () "/></td> <td nowrap=" nowrap "> Description *</td> <td><input type=" text "name=" Description "size=" "><input type=" button "value=" Add "onclick=" Addmorerow () "></td> <td nowrap=" nowrap "> <input type=" button "id=" delbtn "value=" Delete "D isabled= "Disabled" onclick= "Deletemorerow ()" > </td> </tr> </table> <table> <tr align= " Center "> &LT;TD align=" center "> <input type=" Submit "value=" save "> <input type=" reset "value=" Cancel ">< /TD> </tr> </table> </forM> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.