js弹出一个可编辑的层

2014-10-30 16:45:06 · 作者: · 浏览: 76

  ==========js文件===========


  function S(i){return document.getElementById(i)}


  function copyUrl(){


  var clipBoardContent=S("downloadDirect").href;


  try{


  window.clipboardData.setData("Text",clipBoardContent);


  alert("Liehuo.Net提示:复制成功!");


  }catch(e){


  alert("Liehuo.Net提示:复制失败!");


  }


  }


  //在不是连接的位置单击时,隐藏 显示的层


  document.onclick = function(evt){


  var _target = evt evt.target : event.srcElement ;


  var _id = _target.id;


  if( _id == "" ){


  _id = _target.tagName;


  }


  if( _id !="A"){


  S("downloadPanel").style.display = 'none';


  }


  }