zoukankan      html  css  js  c++  java
  • javascript实现多个上传控件

    <html>
    <head>
       <script type="text/javascript">
           function add() {
               var br = document.createElement("br");
               var file = document.createElement("input");
               var button = document.createElement("input");
               file.type = "file";
               file.name = "file";
               button.type = "button";
               button.name = "addbutton";
               button.value = "remove";
               var td = document.getElementById("upload");
               td.appendChild(br);
               td.appendChild(file);
               td.appendChild(button);
    
               button.onclick = function () {
                   td.removeChild(br);
                   td.removeChild(file);
                   td.removeChild(button);
               }
    
           }
    </script>
    </head>
    <body>
       <table align="center" width="50%" border="1">
       <td id="upload"><input type="file" name="upload" /><input type="button" name="add" onClick="add()" value="add more"/></td>
       </table>
    </body>
    </html>
  • 相关阅读:
    webNav
    keyBoardValue
    认证,权限,频率
    路由组件与视图集中附加action的声明
    视图组件
    请求与响应
    DRF序列化组件
    DRF入门及安装
    后台管理
    auth认证模块
  • 原文地址:https://www.cnblogs.com/caok168/p/2581954.html
Copyright © 2011-2022 走看看