日期:2014-05-20  浏览次数:20769 次

js 对<textarea> 赋值 求大神。
本帖最后由 u012758978 于 2013-11-07 17:08:59 编辑
<td class="tr"><textarea name="post[content]" id="content" class="dsn"></textarea>
<script type="text/javascript">var ModuleID = 2;var DTAdmin = 0;var EDPath = "fckeditor/";var ABPath = "http://www.168.gl/member/fckeditor/";var EDW = "98%";var FCKID = "content";</script><script type="text/javascript" src="fckeditor/fckeditor.js"></script><script type="text/javascript">window.onload = function() {var sBasePath = "fckeditor/";var oFCKeditor = new FCKeditor("content");oFCKeditor.Width = "98%";oFCKeditor.Height = "300px";oFCKeditor.BasePath = sBasePath;oFCKeditor.ToolbarSet = "Default";oFCKeditor.ReplaceTextarea();}</script><script type="text/javascript" src="http://www.168.gl/file/script/fckeditor.js"></script><span id="dcontent" class="f_red"></span>
</td>


请教大神 这种输入框 我要怎么给他赋值- -

------解决方案--------------------
用的innerHTML:

document.getElementById("content").innerHTML="js typed";

------解决方案--------------------
楼主这发的格式 看到都头晕了 
innerHTML +1
------解决方案--------------------
万能的innerHTML。
亲,最好能把代码格式化一下,眼晕啊。