![](/img/trans.png)
[英]How to add CSS class and control elements inside of the Iframe using javaScript.?
[英]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.