不好意思,前几天我确实是回复你了,不过等了几天也没看见 有人理会我那新开的回复帖子,于是我就删了那个帖子。最近很忙。现在给你答案把 <iframe></iframe> <script defer> var win=document.frames[0].window;win.document.designMode="On"; win.document.onkeydown=func;function func(){ //是否按下了 Del if (win.event.keyCode!=46) return;
//选择区域是纯文本或者没有选择区域 if (win.document.selection.type!="Control") return; //包含选择区域所有Tags var coll=win.document.selection.createRangeCollection() for(var i=0;i<coll.length;i++){ if (coll(i).tagName=="IMG") alert(coll(i).src) } } </script>
你给的地址打不开呀!
有人理会我那新开的回复帖子,于是我就删了那个帖子。最近很忙。现在给你答案把
<iframe></iframe>
<script defer>
var win=document.frames[0].window;win.document.designMode="On";
win.document.onkeydown=func;function func(){
//是否按下了 Del
if (win.event.keyCode!=46) return;
//选择区域是纯文本或者没有选择区域
if (win.document.selection.type!="Control") return; //包含选择区域所有Tags
var coll=win.document.selection.createRangeCollection()
for(var i=0;i<coll.length;i++){
if (coll(i).tagName=="IMG") alert(coll(i).src)
}
}
</script>