http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/execcommand.asp

解决方案 »

  1.   

    http://www.syszedu.net/jiang/Dragon/1752.htm
      

  2.   

    yarshray(saga jion) 这位大哥
    function AddLink()
    {//Identify selected text
    var sText = document.selection.createRange();
    if (!sText==""){
        //Create link
         document.execCommand("CreateLink");
         //Replace text with URL
         if (sText.parentElement().tagName == "A"){
           sText.parentElement().innerText=sText.parentElement().href;
           document.execCommand("ForeColor","false","#FF0033");
         }    
      }
    else{
        alert("Please select some blue text!");
      }   
    }这段代码在C#中怎么写?
    为什么总是说“灾难性故障  interop.DHTMLEDLib”.
    高手救救我。
      

  3.   

    public void DocumentCopy()//在DHTMLEdit上实现copy
    {
    try
    {
    object selectRange=this.axDHTMLEdit1.DOM.selection.createRange();
    this.axDHTMLEdit1.ExecCommand(DHTMLEDLib.DHTMLEDITCMDID.DECMD_COPY,DHTMLEDLib.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER,ref selectRange);//看这里用了控件的ExecCommand方法
    }
    catch(Exception ex)
    {
    MessageBox.Show(ex.Message);
    }
    }