textarea.value返回初始值,而不是编辑值

时间:2013-06-30 18:25:54

标签: javascript html tinymce

我尝试使用TinyMCE为我的CMS创建预览。单击预览链接时 <a href="javascript:preview()">preview</a>,功能预览正确启动:

function preview() {
    w = window.open("preview.php?text=" + encodeURIComponent(document.getElementsByName("content")[0].value), "Vorschau", "width=" + screen.width + ",height=" + screen.height);
    //...
}

textarea定义为<textarea name="content" rows="30" cols="100">Some text form a database.</textarea>。当我尝试打开已编辑文本的预览时,将加载数据库中的文本。

我做错了什么?

0 个答案:

没有答案
相关问题