助手设定值的问题 [英] Problem with cleditor To Set Value

查看:86
本文介绍了助手设定值的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我如何将Javascript中的值设置为cleditor.
我尝试了很多方法,但每次都失败了.
我使用以下代码:

Can anyone tell me how I can set the value from Javascript to cleditor.
I have tried many ways but I failed each time.
I use the following code:

<script type="text/javascript">
  $(document).ready(function() {
        $("#input").cleditor({
            width:300, height:200
        });
      });
       jQuery.cleditor.updateTextArea(
       {
       }
       );
      function GetData(id)
      {
            var title= document.getElementById('Title_'+id).innerHTML;
            document.getElementById('<%=txtTitle.ClientID%>').value=title;
            var description = document.getElementById('Detail_'+id).innerHTML;
            document.getElementById("input").value= description;
            alert(document.getElementById("input").value);
           
           alert($("#input").cleditor()[0].value);
            return true;
        }
    </script>

推荐答案

(document).ready(function(){
(document).ready(function() {


(#input").cleditor({ 宽度:300,高度:200 }); }); jQuery.cleditor.updateTextArea( { } ); 函数GetData(id) { var title = document.getElementById('Title _'+ id).innerHTML; document.getElementById('<% = txtTitle.ClientID %> ').value = title; var description = document.getElementById('Detail _'+ id).innerHTML; document.getElementById("input").value =说明; alert(document.getElementById("input").value); alert(
("#input").cleditor({ width:300, height:200 }); }); jQuery.cleditor.updateTextArea( { } ); function GetData(id) { var title= document.getElementById('Title_'+id).innerHTML; document.getElementById('<%=txtTitle.ClientID%>').value=title; var description = document.getElementById('Detail_'+id).innerHTML; document.getElementById("input").value= description; alert(document.getElementById("input").value); alert(


(#input").cleditor()[0] .value); 返回true; } < /script >
("#input").cleditor()[0].value); return true; } </script>


这篇关于助手设定值的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆