<input type="button" value="go" onclick="location.href='http://www.csdn.net'">

解决方案 »

  1.   

    a页面
    =======================
    <input type="button" value="go" onclick="location.href='b.htm'">
    b页面
    =======================
    <input type="button" value="go" onclick="location.href='a.htm'">
      

  2.   

    先谢谢了~!
     我的页面只有一个,结构如下:
       上面是一个按纽,下面是一个表格,我点击此按纽切换表格数据用CIS图表示,那也是上面那样就可以了吗?
      

  3.   

    <input type=button value=前进 onclick="window.history.go(1)">
    <input type=button value=后退 onclick="window.history.go(-1)">
    <input type=button value=前进 onclick="window.history.forward()">
    <input type=button value=后退 onclick="window.history.back()">
      

  4.   

    <input type=button value=前进 onclick="window.history.go(1)">
    <input type=button value=后退 onclick="window.history.go(-1)">
    <input type=button value=前进 onclick="window.history.forward()">
    <input type=button value=后退 onclick="window.history.back()">
      

  5.   

    只有一个页面吗?
    方法一:用ASP写(请求后台服务):
    <%
    type1 = Request("type")
    if type1 = "" or type1 = "new" then'显示页面1
    %>
    <script language=javascript>
    function tt1()
    {
    window.location = "a.asp?type=old"
    }
    </script>
    <input type=button value="显示页面2" onclick=tt1()  name=button1>
    <%
    else'显示页面2
    %>
    <script language=javascript>
    function tt2()
    {
    window.location = "a.asp?type=new"
    }
    </script>
    <input type=button value="显示页面1" onclick=tt2() name=button2>
    <%end if%><%
    if type1 = "" or type1 = "new" then'以下用于显示页面1
    %><%
    else'-----------------------------------------以下用于显示页面2
    %><%end if%>很简单的,不懂就问哈。方法2:不用asp页面,这时我们就要用到层了:<script language=javascript>
    function go_div1()
    {
    document.getElementById("div1").style.visibility = "visible"
    document.getElementById("div2").style.visibility = "hidden"
    }function go_div2()
    {
    document.getElementById("div2").style.visibility = "visible"
    document.getElementById("div1").style.visibility = "hidden"
    }
    </script><div id = div1
     style="BACKGROUND-COLOR: slateblue; HEIGHT: 300px; POSITION: absolute; VISIBILITY: hidden; WIDTH: 300px; heigth: 300px; TOP:100px">
    我是第一个页面
    </div>
    <div id = div2
     style="BACKGROUND-COLOR: lightgreen; HEIGHT: 400px; LEFT: 500px; POSITION: absolute; VISIBILITY: hidden; WIDTH: 300px; TOP:100px">
     我是第二个页面</div>
    <input type=button value="显示页面1" onclick=go_div1()>  <input type=button value="显示页面2" onclick=go_div2()>
      

  6.   

    谢谢 yinwenjie(java入门中) 了,第一个方法我不能用,因为我用jsp,第二个我试试看吧~!
      谢谢大家了~!
      

  7.   

    JSP啊,那更要探讨以下了,不知你使用的是哪种模式?MVC吗??
      

  8.   

    是啊~!
     我们是用的jsp+sevlet+javaBean模式,用JSP只是做前台页面的东西,不牵涉到sevlet和javabean,所有功能都由后台实现~!
      另外问一下:yinwenjie(java入门中) ,在上面的代码中,“我是第一个页面”是不是就是要换成我的第一个页面,我的第一个页面是一个动态的数据表也可以吗?而我的第二个页面是一个gis图啊,也是动态的,那样做可以吗?
      

  9.   

    我定义一个A.class
    {
      public A()
      {
        .......
      }
      public String cc()
      {
        return "goog luck!!"
      }
      ..........
    }
    <div  id=div1>
    层中的数据是动态生成的,比如:
    <jsp:useBean id="tt" class="A" scope="page">
    </jsp>
    <%=A.c()%>
    </div>
    这样当我的div可见时,我的"good luck"就可以看见了,你qq是多少??
      

  10.   

    a.html
    <a href = "b.html">连接到b</a>
    b.html
    <a href = "a.html">连接到a</a>
    这不成吗?