87,907
社区成员
发帖
与我相关
我的任务
分享
<iframe style="border:1px solid #CC99FF" id="WEditor" name="WEditor" height="200" width="397" marginheight="2"
marginwidth="2" onfocus="alert('a')" > </iframe>
<script>
var isIE = document.all;
var isFF = window.getSelection;
window.onload=function()
{
var editor=isIE?document.getElementById("WEditor"):document.getElementById("WEditor").contentWindow
if (isFF)//FireFox
{
editor.document.addEventListener("click",function(){alert("a");},false);
}
}
</script>