这段代码如何兼容 FireFox ,在线等! 怎么没人会啊?经过我测试,如果去掉 editor.document.designMode="on" 则可以正 alert ,关键是我必须要 document.designMode = "on"请高手赐教。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你开什么玩笑,就 editor 直接写嘛也不得行嘛 <script language="javascript">function showContextMenu(){ alert("Show it!"); return false;}function a(){ var editor = window.frames["editor"]; editor.document.designMode="on" editor.focus(); editor.document.contentEditable = true; if(document.all){ editor.document.oncontextmenu = new Function("return showContextMenu();") }else{ editor.document.addEventListener("contextmenu", function(oEvent){ oEvent.preventDefault(); return showContextMenu();}, false); }}</script> 关闭IE ,退出登录的另一个问题 JS获取服务器端时间! 在Web页面中如何实现可输可选的下拉框?请各位高手指点! $(window).resize(function (){})我想传递两个参数,但由于其不需要调用,不知如何传递 急,怎么访问jquery.load取回后的html元素 菜鸟求教,jquery选择器的问题 大家帮忙看一下!代码!我有点不太明白!帮忙给个注释 大师,帮我一把啊?怎样在页面中(比如有多个输入框)判断取得当前光标所在控件的位置? 链接问题? 有微信小程序大佬帮帮孩子吗 关于iframe内存泄露问题!80分悬赏! 高分求一个JS 。。不断加分,到满意
<script language="javascript">
function showContextMenu()
{
alert("Show it!");
return false;
}function a(){
var editor = window.frames["editor"];
editor.document.designMode="on"
editor.focus();
editor.document.contentEditable = true;
if(document.all){
editor.document.oncontextmenu = new Function("return showContextMenu();")
}else{
editor.document.addEventListener("contextmenu", function(oEvent){ oEvent.preventDefault(); return showContextMenu();}, false);
}
}
</script>