转载请注明出处-中国设计秀-cnwebshow.com
例如,我在网页a.html中加了一iframe b.html .
在b.html 中我写了段:
程序代码
现在我想在a.html中写段javascript去改变b.html中.abc的色彩。方法如下:
程序代码
document.frames['content'].document.styleSheets[0].addRule(".abc","color:#FF0000");
其中:
content为iframe的name和id .
例如:
转载请注明出处-中国设计秀-cnwebshow.com 程序代码