久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      js簡單上傳圖片預覽功能的實例詳解

      js簡單上傳圖片預覽功能的實例詳解

      js簡單上傳圖片預覽功能-簡單粗暴

      js簡單上傳圖片預覽功能

      <!DOCTYPE html> <html> <head> <title>js簡單上傳圖片預覽功能</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="http://www.codefans.net/ajaxjs/jquery-1.6.2.min.js"></script> </head> <body> <h3>請選擇圖片文件:JPG/GIF</h3> <form name="form0" id="form0" >     <input type="file" name="file0" id="file0" multiple="multiple" />     <br>     <img src="" id="img0" width="150" height="150" style="display:none;"> </form> </body> </html>   <script type="text/javascript"> $("#file0").change(function(){     var objUrl = getObjectURL(this.files[0]) ;     console.log("objUrl = "+objUrl) ;     if (objUrl) {         $("#img0").attr("src", objUrl) ;         $("#img0").show();     } }) ; //建立一個可存取到該file的url function getObjectURL(file) {     var url = null ;     if (window.createObjectURL!=undefined) { // basic         url = window.createObjectURL(file) ;     } else if (window.URL!=undefined) { // mozilla(firefox)         url = window.URL.createObjectURL(file) ;     } else if (window.webkitURL!=undefined) { // webkit or chrome         url = window.webkitURL.createObjectURL(file) ;     }     return url ; } </script>

      推薦教程:《JS基礎(chǔ)教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號