execCommand 获取 怎么没有人回答呢,不能没有人知道吧? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 怎么没有人回答呢,不能没有人知道吧? 不是不想回答 只因为这个问题我不会... <html><script type="text/javascript">function $(id){ return document.getElementById(id); }function BodyLoad(){ $("iframe_editor").contentWindow.document.designMode = "on";}function SetBold(){ $("iframe_editor").contentWindow.document.execCommand("Bold");}function GetBold(){ alert($("iframe_editor").contentWindow.document.queryCommandValue("Bold"));}</script><body onload="BodyLoad();"><div> <div><iframe id="iframe_editor" height="300px" width="100%" src="about:blank"></iframe></div> <input type="button" value="设置" onclick="SetBold();" /> <input type="button" value="获取" onclick="GetBold();" /></div></body></html> 关于js高阶函数的疑问 javascript的问题 box2d 中如何获取物体坐标 EXTJS 疑难杂症,望高手解决下。~~~哎我搞了好久也解决不了真是苦逼啊 IE6,IE7放大缩小浏览器时,页面刷新问题 一个关于window.open打开窗口的问题(十分奇怪) 新开的窗口如何给父窗口下拉框添加新项。。 js文件中的值如何传给PHP文件变量? 那位朋友可以提供类似CSDN的关闭和显示菜单的代码? onClick 让 IE 全屏 请教一个javascript保存用户输入的问题 js tab 切换问题
<script type="text/javascript">
function $(id){ return document.getElementById(id); }
function BodyLoad(){
$("iframe_editor").contentWindow.document.designMode = "on";
}
function SetBold(){
$("iframe_editor").contentWindow.document.execCommand("Bold");
}
function GetBold(){
alert($("iframe_editor").contentWindow.document.queryCommandValue("Bold"));
}
</script>
<body onload="BodyLoad();">
<div>
<div><iframe id="iframe_editor" height="300px" width="100%" src="about:blank"></iframe></div>
<input type="button" value="设置" onclick="SetBold();" />
<input type="button" value="获取" onclick="GetBold();" />
</div>
</body>
</html>