码迷,mamicode.com
首页 > Web开发 > 详细

点击图片实现文件上传

时间:2016-03-11 23:44:07      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:

  <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Demo</title>
    <script type="text/javascript">
        function F_Open_dialog() 
       { 
            document.getElementById("btn_file").click(); 
       } 

    </script>
</head>
<body>
    <div>
        <input type="file" id="btn_file" style="display:none">
        <img src="http://7u2nae.com1.z0.glb.clouddn.com/2.jpg" onclick="F_Open_dialog()">
    </div>

</body>
</html>

点击图片实现文件上传

标签:

原文地址:http://www.cnblogs.com/php-linux/p/5267489.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!