Loading...

使用javascript獲取ckeditor textarea的textarea值

Temperature: 0 °C

Mark ChangMark Chang
author_tools

一般來說,若我想使用 javascript 來得到 textarea 的值。

可以使用以下方式:

首先,假設我的編輯器ID名為 blog_content

var inputwrite = document.getElementById("blog_content");
alert(inputwrite.value)

但若是使用 ckeditor textarea 編輯器,則必須使用以下方式:
var inputwrite = CKEDITOR.instances.blog_content.getData();
alert(inputwrite.value)

這樣,應該就可以解決獲取ckeditor textarea的textarea值。

以上紀錄
 

https://innstory.com/story-使用javascript獲取ckeditor_textarea的textarea值-1823
javascript

Prev
 Linux下查看版本號指令

Next
Ckeditor使用onkeyup事件綁定卻無動作解決方式 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

破版,很醜!!

破版,很醜!!

pexelsphotowrite5 破版......很醜對不對!! 我想這是所有從事網頁設計師的痛~...

Android UI設計距離課題

Android UI設計距離...

layoutmarginTop指定該屬性所在控件距離上方的位置空間。 layoutmarginBot...

要如何修改Plesk空間上傳檔案大小的限制

要如何修改Plesk空間上傳...

Plesk的預設狀況下上傳檔案限制為M。 若要修改上傳限制 首先點選開發工具的PHP設定 innim...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format