怎么没有人回答呢,不能没有人知道吧?

解决方案 »

  1.   

    怎么没有人回答呢,不能没有人知道吧?
      

  2.   

    不是不想回答 只因为这个问题我不会...
      

  3.   

    <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>