当前位置:编程学习 > JAVA >>

无刷新多文件上传

[css] 
CSS 
<style type="text/css"> 
        #fuplContainer 
        { 
            width: 400px; 
            height: 500px; 
            border: 1px solid #000; 
        } 
        #fuplContainerTitle 
        { 
            width: 113px; 
            height: 30px; 
            font-size: 30; 
            color: #fff; 
            background-color: #124587; 
            text-align: center; 
            vertical-align: middle; 
        } 
        #div_fuplButt, #div_Save 
        { 
            width: 200px; 
            height: 50px; 
            background-color: #154879; 
            border-right: 1px solid #000; 
            border-bottom: 1px solid #000; 
            margin-top: 10px; 
            text-align: center; 
            font-size: 25px; 
            color: #fff; 
            font-family: "幼圆"; 
            vertical-align: middle; 
            cursor: pointer; 
        } 
        .sub 
        { 
            background-color: steelblue; 
            width: 98%; 
            height: 50px; 
            margin-top: 9px; 
            margin-left: 1%; 
            margin-right: 1%; 
            font-size: 15px; 
            color: #fff; 
            display: none; 
        } 
        .loadOK 
        { 
            margin-left: 180px; 
        } 
        .X 
        { 
            color: Red; 
            margin-left: 10px; 
            text-decoration: none; 
        } 
        .rateStrip 
        { 
            width: 60%; 
            height: 3px; 
            background-color: #fff; 
            float: left; 
            margin-left: 20px; 
            margin-top: 2%; 
        } 
        .rateStripIn 
        { 
            background-color: #154789; 
            width: 1px; 
            height: 100%; 
            float: left; 
        } 
    </style> 
HTML
[html] 
<input type="file" id="fupl" name="fupl" style="display: none" /> 
    <div id="fuplContainer"> 
    </div> 
    <div id="div_fuplButt"> 
        添加文件</div> 
    <div id="div_Save"> 
        开始上传</div> 
JS
[javascript] 

var UpLoad = (function () { 
    var _data = { 
        fuplQuere: [], 
        divQuere: [], 
        fupl: undefined, 
        AddButt: undefined, 
        fuplContainer: undefined, 
        UpButt: undefined, 
        h: 0, 
        arrHtml: [] 
    }, 
    _fun = { 
        _initForm: function (data) { 
            data.arrHtml.push('<iframe id="iframeLoad" name="upload" style="display: none">'); 
            data.arrHtml.push('</iframe>'); 
            data.arrHtml.push('<input type="file" id="fupl" name="fupl" style="display: none" />') 
          

补充:web前端 , JavaScript ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,