文件上传原理

<script type="text/javascript">
        function submitFrom(){
            $("#idForm").submit();
        };
    </script>
</head>
<body>
    <h1>文件上传演示</h1>
    <iframe name="aa" style="display:none;"></iframe>
    <form id="idForm" action="xxx" method="post" enctype="multipart/form-data" target="aa">
        <input type="file" name="xls" onchange="submitFrom()">
    </form>
</body>

posted @ 2017-09-02 21:54  缺氧的鱼520  阅读(121)  评论(0编辑  收藏  举报