不明白你的意思。放出页面或者完整一点的代码看看!

解决方案 »

  1.   

    <HTML>
    <HEAD>
    <TITLE>Test</TITLE>
    <script language="javascript">
    var IFrameObject;
    function editPage( FrameObject ){
    if( window.frames(FrameObject.name).document.designMode!="On"){

    window.frames(FrameObject.name).document.designMode="On";
    }
    IFrameObject = FrameObject;
    }
    function insertImgUrl(){
    window.frames(IFrameObject.name).focus();
    var imageurl = prompt("请输入图象的URL链接。","http://");
    if(imageurl==null || imageurl=="" || imageurl=="http://")return false;
    window.frames( IFrameObject.name ).document.execCommand("InsertImage","",imageurl);
    }
    </script>
    </HEAD>
    <BODY onload="window.frames(0).focus();">
    <table width="100%">
    <tr>
    <td width="10%">内容</td>
    <td><IFRAME id="contentFrame"  width="580" name=contentFrame height="400" onfocus="editPage(this)" marginWidth=1 marginHeight=1 scrolling=yes > </IFRAME></td></tr>
    <tr><textarea name='content' style="display:'none'" rows="1" cols="35"></textarea> </tr>
    <tr>
    <td  width="10%">&nbsp;</td>
    <td>
    <INPUT type="button" value="Text" name=viewtext onclick="viewText(this)" class="btn" style= "cursor:hand;background-Color:#C8D2EC" disabled >
    <!--<INPUT type="button" value="HTML" name=viewcode onclick="viewCode(this)" class="btn" style="cursor:hand"> &nbsp;-->
    <INPUT type="button" value="插入表情符号" class="btn" onclick="insertImgUrl()"> 
    <td>
    </tr>
    </table>
    </BODY>
    </HTML>
      

  2.   

    我希望,在插入图片后,不是刚刚插入的图片获得焦点,而是光标在图片后出现,用户能够点击"插入"键继续插入,我是要用他来作表情符号插入的,