当前位置: 动力学知识库 > 问答 > 编程问答 >

jquery - object HTMLTextAreaElement javascript response

问题描述:

Why can't I get the content in a tinymce textarea through Javascript/Jquery? With all the things I've tried, it has always given me [object HTMLTextAreaElement] As a response. What am I doing wrong?

Javascript:

function changeText2(){

var content = tinyMCE.getContent('content');

}

alert(content);

HTML:

<textarea id="content" onkeyup='changeText2()' name="page" cols="50" rows="15">

tinymce editable content in here

</textarea>

网友答案:

You are getting the textarea element itself. To get its value, add .value.

分享给朋友:
您可能感兴趣的文章:
随机阅读: