首页 > 代码库 > 来之不易的js图片上传预览代码

来之不易的js图片上传预览代码

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>图片上传预览js代码--来之不易</title>
</head>
<body>
    <div id="divPreview">
        <img id="imgHeadPhoto" src=http://www.mamicode.com/"noperson.jpg" style="width: 160px; height: 170px; border: solid 1px #d2e2e2;" alt="" />>

来之不易的js图片上传预览代码