本帖最后由 funnyone 于 2010-12-19 16:48:07 编辑

解决方案 »

  1.   


    我是想在a中改变b的css来源
      

  2.   

    <html>
    <frameset cols="50%,50%">
     <frame src="frame_a.html"/>
     <frame src="frame_b.html" name="frame_b"/>
    </frameset>
    </html>
    =======================
    <html>
    <head>
    <script> function change(){
    var frameB = top.frames["frame_b"];
    var changeBeforCss = frameB.document.getElementById("css1");
    alert(changeBeforCss.href);
    changeBeforCss.href = "";
    alert(changeBeforCss.href);

    }</script></head>
    <body>frame_a.html
    <br>
    <input type="button" value="change" onclick="change()"/>
    </body>
    </html>
    ===========================
    <html>
    <head>
    <link href="mywork.css" rel="stylesheet" type="text/css" id="css1"></head>
    <body>frame_b.html
    <br><a href="">aaa</a>
    <br>
    <input type="text" name="test"/>
    </body>
    </html>