日期:2014-05-16  浏览次数:20371 次

关于一个js调用另一个js中变量的问题,请各位高手帮忙解答一下,谢谢了,急急急~~!!!!!
我的代码如下:
a.html
---------------------------------------------
<html>
      <head>
      </head>
      <body>
          <iframe   id= "b "   src= "b.html "/>
          <iframe   id= "c "   src= "c.html "/>
        </body>
</html>

b.html
-------------------------------------------------
<html>
    <head>
    </head>
      <body>
            <script   type= "text/javascript "   src= "b.js "/>
      </body>
</html>

b.js
------------------------------------------------------

c.html
---------------------------------------------------
<html>
    <head>
    </head>
      <body>
            <script   type= "text/javascript "   src= "c.js "/>
      </body>
</html>

c.js
------------------------------------------------
var   test   =   "12345 ";
问题是,我想在b.js中调用c.js中的变量test并改变它的值,应该怎么调用,谢谢了,急急!!!!

------解决方案--------------------
parent.frames[ "c "].execScript( "c= '45678 '; ");