|
@@ -0,0 +1,87 @@
|
|
|
|
+<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
|
|
+ pageEncoding="UTF-8"%>
|
|
|
|
+<%@ page session="true" %>
|
|
|
|
+<%
|
|
|
|
+ String filename = request.getParameter("filename");
|
|
|
|
+%>
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html>
|
|
|
|
+<head>
|
|
|
|
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
+<title>Insert title here</title>
|
|
|
|
+<style>
|
|
|
|
+.a-upload {
|
|
|
|
+ padding: 4px 50px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ position: relative;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ color: #000;
|
|
|
|
+ background: #fafafa;
|
|
|
|
+ border: 1px solid #ddd;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ *display: inline;
|
|
|
|
+ *zoom: 1;
|
|
|
|
+ margin-left:20px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.a-upload input {
|
|
|
|
+ position: absolute;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ right: 0;
|
|
|
|
+ top: 0;
|
|
|
|
+ opacity: 0;
|
|
|
|
+ filter: alpha(opacity=0);
|
|
|
|
+ cursor: pointer
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.a-upload:hover {
|
|
|
|
+ color: #444;
|
|
|
|
+ background: #eee;
|
|
|
|
+ border-color: #ccc;
|
|
|
|
+ text-decoration: none
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.submit{
|
|
|
|
+width:100px;
|
|
|
|
+height:30px;
|
|
|
|
+font-size: 18px;
|
|
|
|
+border: 1px solid #ddd;
|
|
|
|
+border-radius: 4px;
|
|
|
|
+background: #fafafa;
|
|
|
|
+margin-top:20px;
|
|
|
|
+color:#000;
|
|
|
|
+float:right;
|
|
|
|
+position:relative;
|
|
|
|
+right:40px;
|
|
|
|
+cursor: pointer
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+<script type="text/javascript">
|
|
|
|
+ function setpic(){
|
|
|
|
+ var inputObj=document.getElementById('myFile');
|
|
|
|
+ inputObj.click();
|
|
|
|
+ inputObj.value ;
|
|
|
|
+ }
|
|
|
|
+ function addpic(){
|
|
|
|
+ alert(document.getElementById('myFile').value);
|
|
|
|
+ }
|
|
|
|
+ function uploadpic(){
|
|
|
|
+ var form = document.getElementById('uploadForm');
|
|
|
|
+ form.submit();
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+</head>
|
|
|
|
+<body style="background:#002c59;height:120px;width:200px;">
|
|
|
|
+<div style="height:100%;width:100%">
|
|
|
|
+<form id="uploadForm" action="upload.jsp" method="post" enctype="multipart/form-data" class="test_form">
|
|
|
|
+<!-- <a id="myclick" href="javascript:;" class="a-upload"> -->
|
|
|
|
+<input type="file" id="myFile" name="myFile" value="" style="visibility:hidden;" onchange="uploadpic()">
|
|
|
|
+<!-- </a>
|
|
|
|
+<input type="submit" name="submit" class="submit"> -->
|
|
|
|
+</form>
|
|
|
|
+</div>
|
|
|
|
+</body>
|
|
|
|
+</html>
|