我已經使用CKEditor爲我的文本框造型.i已經添加到我的文本框中,但是如果我想從文本框中獲取我的id,那麼它給出未定義的值。任何人都可以幫助我解決我的查詢,這對我有所幫助。我怎樣才能使用ckeditor文本框的id(使用ajax)
<script src="//cdn.ckeditor.com/4.5.11/standard/ckeditor.js"> </script>
<script> CKEDITOR.replace('editor1'); </script>
<script>
$(document).ready(function(){
var topic_describe=$("#add_val").html();
\t \t alert(topic_describe);
});
</script>
<textarea name="editor1" id="add_val"></textarea>
<br/>
\t <a href='#' class="btn btn-success" style=' padding-top:10px;' id='submit' ><strong><span class='glyphicon glyphicon-pencil'></span> Add Post </strong></a>
你能對你正試圖在這裏實現的目標更加明確:做ü希望的textarea的'id'或者其內部的內容。沒有附加圖片,也沒有任何操作在'添加帖子'鏈接/按鈕上定義。 –
誰在我的文章中使用投票?請告訴我 –
實際上,我想要Textarea的內容並用於通過使用ajax在另一個頁面上重定向。 –