首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

firefox 与IE 上 获得图片预览方法 &时间处理

2012-09-09 
firefox 与IE 下 获得图片预览方法 &时间处理//firefox 与IE 下 获得图片预览方法if (obj) {//ieif (windo

firefox 与IE 下 获得图片预览方法 &时间处理







//
firefox 与IE 下 获得图片预览方法
    if (obj) {              //ie              if (window.navigator.userAgent.indexOf("MSIE") >= 1) {                  obj.select();               //   return document.selection.createRange().text;                  $("#"+srcFile).attr("src", document.selection.createRange().text);            }              //firefox              else if (window.navigator.userAgent.indexOf("Firefox") >= 1) {               oFReader = new FileReader();                          var oFile = document.getElementById("couponImage").files[0];                          oFReader.readAsDataURL(oFile);                                       oFReader.onload = function (oFREvent) {            //  document.getElementById("couponImageSrc").src = oFREvent.target.result;             $("#"+srcFile).attr("src", oFREvent.target.result);             };              }          } 

热点排行