English 中文(简体)
chrome javascriptdommov iframe backgroundimage
原标题:chrome javascript dom remove iframe backgroundimage

我先是说的是幼.的延伸范围,我似乎正在处理许多有 if果的问题。 不管怎么说,我有一把镜子注入一个网站(交叉主机)。 我也想到的是,继承父母的亲子背景(其血缘)。 因此,这是我努力的:

//Setup iframe attributes
iframe.setAttribute("id","injected_frame");
iframe.setAttribute("src",  google.com );
iframe.setAttribute("width","100%");
iframe.setAttribute("height","425");
iframe.setAttribute("frameborder","0");
iframe.setAttribute("scrolling","auto");
iframe.setAttribute("style","backgroundImage: inherit"); <-- undefined error

从根本上说,它只是不做工作,背景不变,在试图这样做时,我发现了一个不明确的错误。

问题回答

You could probably just change "backgroundImage: inherit" to "background-image: inherit", but then any other inline styles on iframe may be lost because I believe that would reset the style attribute completely.

因此,我建议把最后一行改为<条码>iframe.上。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签