簡體   English   中英

使用JavaScript將CSS添加到iframe wihout ID內的iframe中

[英]Add CSS to an iframe inside an iframe wihout ID using Javascript

我在iframe中有此iframe。 這兩個iframe都沒有ID。 代碼如下:

 <div id="Test"> <iframe> <iframe> <head> <style>*CSS code right here*</style> </head> <body> </body> </iframe> </iframe> </div> 

我可以使用JavaScript在第二個iframe上添加一些CSS嗎?

要獲取下一個iframe,請嘗試此操作。

$(document).ready(function(){
$("iframe").next(iframe).css({"color": "red"});});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM