如何对iframe进行添加和更改css才做?
- HTML code
<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>
------解决方案--------------------
http://blog.csdn.net/theforever/article/details/6126635