如题,一个表单中,如果是一个textarea,可以用:document.getElementById("content").value="1111"这样来赋值,但是如果这个是一个隐藏textarea的在线编辑器,如:
<textarea id="content" name="content" style="display:none;"></textarea>
<iframe id="HtmlEditor" class="editor_frame" frameborder="0" marginheight="0" marginwidth="0" style="width:100%;height:260px;overflow:visible;" hideFocus></iframe>
这样表单中,隐藏了id=content的textarea,似乎是在iframe中操作的,这样如何赋值到iframe中呢?
<textarea id="content" name="content" style="display:none;"></textarea>
<iframe id="HtmlEditor" class="editor_frame" frameborder="0" marginheight="0" marginwidth="0" style="width:100%;height:260px;overflow:visible;" hideFocus></iframe>
这样表单中,隐藏了id=content的textarea,似乎是在iframe中操作的,这样如何赋值到iframe中呢?
解决方案 »
- 用正则表达式 替换字符串 {asd}niasd{asdasd}217{12ex} 中 {%}中的参数 为<input> 字符串是传过来的参数
- 一个简单jquery问题
- 求助关于dtree+jquery动态读取xml并显示的问题
- 多个web页面同时打印,如何确保打印顺序?
- 如何使用JS将粘贴扳里的内容复制到textarea
- 谁能帮解释下这段代码的意思啊?要详细点的!
- 能否以面向对象的方式插入行即是否有这样的函数table.insertRow(Row rowObject)
- 跨域iframe问题?
- 急问:如何用javascript 语句动态改变select框中的选中项
- 还有人在吗?问个急急急的问题。。。
- javascript 读写txt问题
- js里面可以嵌套vbscript吗?
var editorWin=document.getElementById('HtmlEditor').contentWindow;
editorWin.onload=function(){
editorWin.document.body.innerHTML = 'dddddddddddd';
}
//外面 的textarea可以直接赋值