Home > Web Front-end > JS Tutorial > Implementation of js batch upload interface_form special effects

Implementation of js batch upload interface_form special effects

WBOY
Release: 2016-05-16 19:05:34
Original
1092 people have browsed it

1. Download the plug-in for quick upload.
2. Use HTML upload control to upload with restrictions.

I will use javascript script to implement the function 2 below.

1. Dynamically add upload controls.
2. Dynamically delete the upload control.
3. Restrict users from randomly inputting paths in the upload control.


[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]<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.returnValue=false; } } </script>
Related labels:
js
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template