<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <%@include file="../../../frame/assets/header-all.jsp"%>
    <style>
        .form-line .text-content {
            width: 160px;
        }

        <!--

        * {
            font-size: 13px
        }

        body {
            margin: 0
        }

        .line {
            position: relative;
            float: left;
            padding: 8px 0;
            border-left: 0 !important;
        }

        .line span {
            float: left
        }

        input {
            border: 1px solid #888;
            vertical-align: middle
        }

        .file {
            position: absolute;
            left: 90px;
            top: 8px;
            display: none;
            filter: alpha(opacity=0);
            opacity: 0
        }

        .file1 {
            padding: 6px 13px;
            display: block;
            float: left;
            background: #67c23a;
            color: #fff;
            z-index: 1;
            margin-left: 5px;
            vertical-align: middle;
            cursor: pointer
        }

        .inputstyle {
            width: 180px;
            height: 26px;
            border: 1px solid #888;
            z-index: 99
        }

        .fail {
            padding: 0 5px;
        }

        -->
        .LIEVK {
            overflow: auto;
            height: 114px;
        }

        .datagrid-body {
            height: 85px !important;
        }
    </style>
</head>
<body class="easyui-layout">、
<form id= "uploadForm" enctype="multipart/form-data">

    <div class="form-line clearfix">
        <div class='fl'>
            <p >指定文件名： <input type="text" name="filename" id="filename" value= ""/></p >
            <br/>
            <p >上传文件： <input type="file" name="file" id="file" onchange="changename()"/></p>
            <input type="button" value="上传" class="file1" onclick="doUpload()" />
        </div>
    </div>
</form>
</body>
</html>
<script type="text/javascript">
    function changename() {
        $('#filename').val(document.getElementById('file').files[0].name);
    }
    function doUpload() {
        var formData = new FormData($( "#uploadForm" )[0]);
        $.ajax({
            url: "nhywsbipglAction!imp_Nhywsbipgl.do",
            type: 'POST',
            data: formData,
            async: false,
            cache: false,
            contentType: false,
            processData: false,
            success: function (data) {
                alert(data);
            },
            error: function (data) {
                alert(data);
            }
        });
    }
</script>
