如何对iframe进行添加和更改css才做?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function add_iframe_css(){
//如何在iframe中的百度添加一行css连接
// <link id="iframe_css" href="http://localhost/a.css" type="text/css" rel="stylesheet"/>
}
function change_iframe_css(){
//如何更改上面的#iframe_css的css连接属性
// <link id="iframe_css" href="http://localhost/b.css" type="text/css" rel="stylesheet"/>
}
</script>
<iframe style="width:100%;height:80%" src="http://baidu.com"></iframe>
<button onclick="add_iframe_css()">add_iframe_css</button>
<button onclick="change_iframe_css()">change_iframe_css</button>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function add_iframe_css(){
//如何在iframe中的百度添加一行css连接
// <link id="iframe_css" href="http://localhost/a.css" type="text/css" rel="stylesheet"/>
}
function change_iframe_css(){
//如何更改上面的#iframe_css的css连接属性
// <link id="iframe_css" href="http://localhost/b.css" type="text/css" rel="stylesheet"/>
}
</script>
<iframe style="width:100%;height:80%" src="http://baidu.com"></iframe>
<button onclick="add_iframe_css()">add_iframe_css</button>
<button onclick="change_iframe_css()">change_iframe_css</button>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货