【发布时间】:2011-12-06 01:58:04
【问题描述】:
我正在尝试对greasemonkey 用户脚本进行一些修改以实现我需要的功能。代码是这样的
showAddress:function(addrString,type)
{
this.addrBox=$('<div id="batchPublish"></div>')
.append('<div id="batchHeader"></div>')
.append('<div id="batchContent" style="float:left;clear:both"></div>');
.........
var batchContent=this.addrBox.find('#batchContent')
.append('<pre width="300" style="text-align:left" id="batchedlink"></pre>');
this.addrBox.find('#batchedlink').css({'width':'500px','height':'250px','overflow':'auto','word-wrap': 'break-word'})
.append(addrString);
$.blockUI({message:this.addrBox,css:{width:"520px",height:"300px"}}); }
基本上,这段代码将数据写入 html。我想要实现的是将“addrString”写入嵌入的 iframe。现在它在“pre”标签中。我尝试了很多方法,但仍然没有运气。 iframe 总是空的。 我完全是 javascript 的新手,不清楚这是否可能。
感谢您的帮助。
【问题讨论】:
标签: javascript jquery iframe userscripts