我把这个下拉列表的代码放在了一个页面里。
然后再在另一个页面iframe住那个放了下拉列表的页面。
下拉列表代码如下:<select   onchange="window.location=this.options[this.selectedIndex].value">   
  <option   value="http://dotnet.aspx.cc">http://dotnet.aspx.cc   
  <option   value="http://dotnet.aspx.cc">http://dotnet.aspx.cc   
  </select>不过结果是在那个放了下拉列表的那个页面里变了。。我现在想是希望外面镶住它的页面变。该怎么做呢?
谢谢了!

解决方案 »

  1.   

    <select  onchange="window.parent.location=this.options[this.selectedIndex].value">  or
    <select  onchange="window.top.location=this.options[this.selectedIndex].value">  
      

  2.   

    谢谢。。 不过你的代码是重新打开一个新的页面。。 
    我的意思是比如:01.html中iframe了02.html
    02.html中就是那个下拉列表。。
    在01.html中选择那个下拉列表。。 01.html这个页面跳转谢谢你了!
      

  3.   

    <select  onchange="window.parent.location=this.options[this.selectedIndex].value">  
    这个可以吧
      

  4.   

    我的代码不是打开新页面,而是替换父页面,
    你的描述不清楚,没明白你要啥效果。01.html中iframe了02.html
    02.html中就是那个下拉列表。。
    在01.html中选择那个下拉列表。。 01.html这个页面跳转 不知道你这段说的是啥,你原来的代码就已经实现了你说的这个
      

  5.   

    现在用tt就可以了,,呵呵之前用ie不知为啥新个页面