那麼,我首先編寫了一個Javascrip函數,根據您在下拉框中所做的選擇,改變textarea
中的文本,這非常簡單。一旦CKeditor實例被調用,Javascript不能更改textarea中的文本
HTML
<form name="formconteudo">
<select name="selectpage" onChange="change();">
<option value="1">something</option>
<option value="2">another thing</option>
<option value="3">going crazy</option>
</select>
</form>
JS
var Code = new Array("", "Selected 1", "Selected 2", "Selected 3");
function change()
{
var ID = formconteudo.selectpage.options[formconteudo.selectpage.selectedIndex].value;
document.formconteudo.ckeditor.value = Code[ID];
}
這個工作不錯,並改變在textarea的文字。但後來我在該textarea上調用了CKeditor實例,以便我可以在該textarea上使用CKEditor。編輯器加載得很好,效果很好。但現在的JavaScript不工作。
有關這個問題的任何提示?
感謝
Bingo,就是這樣。謝謝。 – 2010-01-10 22:29:53
謝謝。你也一樣。 – 2010-01-10 22:34:26