window.location.href 返回当前的完整地址,请问这个值是可以更改的吗?怎么更改?
新来的小弟象大家请安了.

解决方案 »

  1.   

    window.location.href = “abcd”?这样不行啊
      

  2.   

    <html>
    <head>
    <title>Main</title>
    <script>
    function fClick()
    {
    window.location.href="child.html";
    }
    </script>
    </head>
    <body>
    <input type="button" value="click" onclick="fClick()">
    </body>
    </html>怎么能不行呢,肯定是你的路径指定的不对。自己好好看看吧。
      

  3.   

    这样子网页就会自动转到新的页面了,我的意思是只改window.location.href的值,而页面不转.
      

  4.   

    为什么不跳转页面却要改他的值?不自动跳转就把 fClick()放在href的onclick里面应该可以吧。