当我选择网页内容的时候激发的事件是什么。选中的是任何内容
解决方案 »
- 大虾们帮帮忙
- textarea每输出一个变量就换行输出第二个变量的值
- 菜鸟想建2个HTML页,在页面1上输入奥运会3个字,点按钮,就会打开第2个页面,这时这个页面上所有关于奥运会3个字都变成鲜艳的黄色显示,怎么做呢,高手们??
- document.getElementsByTagName("form")[0].nodeAction?
- JSP中怎么把checkbox的值传给JS实现的右键
- Dephi与C#,我应该选择哪个?
- 为什么这段代码在ie6/myie/mozilla/下都正常.在IE5下不行呢?
- 滚动的stop!一定给分.
- 如何捕获ActiveX控件的事件?
- bootstrap table 固定列后,checkbox 选择框失效
- 一个简单的dom问题,白给分
- 请问这里的变量不能放在sizexofn里面吗?
editor = document.getElementById("MsgFrame").contentWindow;
//window.frames["MsgFrame"].document.designMode="On"
editor.document.open();
editor.document.writeln('<html><head>');
editor.document.writeln("</head><body></body></html>");
editor.document.onclick = "alert()";
editor.document.close();
editor.document.designMode = 'On';
editor.document.contentEditable = true;
editor.document.charset="utf-8";
我的代码是这样的
当editor.contentWindow.document.body.onselectstart = function(){}方法加载事件时
提示body为空,不知道我的方法有没有错
不过
<input type="button" onclick='alert(document.getElementById("MsgFrame").contentWindow.document.body.innerHTML)' value="Text" />
的方法可以实现
这句话iframe的onload中,或者设置setTimeout中应该也可以
editor.contentWindow.document.body.onselectstart = function(){}
这句话iframe的onload中,或者设置setTimeout中应该也可以