在ASP.NET中,用javascript给CuteEditor控件赋值

function setValue()
{
   var editor = document.getElementById('');
   editor.ExecCommand('paste',false,'');
   var r = editor.GetDocument().selection.createRange(); //暂时还不明白它的作用。
   //window.clipboardData.getData("TEXT"); 是得到粘贴板的值
   if (window.clipboardData.getData("TEXT")!=null)
   {
       r.text = window.clipboardData.getData("TEXT");
   }
}
1)r.text是得到CuteEditor控件的文本值,
2)r.htmltext是得到它的HTML值,
具体可用VS2003调试JavaScript便可看到它的内容。
Email:chenzhitong1984@163.com
原文地址:https://www.cnblogs.com/cztom/p/501282.html