点击一个按钮,能够超级链接的作用吗?

解决方案 »

  1.   

    可以。你的是什么按钮?Response.Redirect("xxx.aspx");
      

  2.   

    在按钮的onclick事件中加上
    Response.Redirect("abc.aspx");
    或Response.Wirte("<script>window.open('abc.aspx')</script>")   //这是新开窗口~
      

  3.   

    <input type="button" name="bb" value="按钮" onClick="location.href='indexie.html'">
      

  4.   

    谢谢!  如嫌分不够,我会给本帖加分的呀
    <asp:button id="Button1" style="Z-INDEX: 139; LEFT: 696px; POSITION: absolute; TOP: 264px" onclick="Response.Redirect(WebForm2.aspx);"
    tabIndex="16" runat="server" Width="64px" Text="下一步"></asp:button>可我这样写会出错呀。
    “/orderformInput”应用程序中的服务器错误。
    --------------------------------------------------------------------------------编译错误 
    说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS1026: 应输入 )源错误: 行 59:  <FONT id="FONT1" face="宋体" runat="server">
    行 60:  <asp:label id="Label1" style="Z-INDEX: 100; LEFT: 423px; POSITION: absolute; TOP: 32px" runat="server"
    行 61:  Font-Size="X-Large" Height="32px" Width="440px">主订单输入</asp:label><asp:button id="Button1" style="Z-INDEX: 139; LEFT: 696px; POSITION: absolute; TOP: 264px" onclick="Response.Redirect(WebForm2.aspx);"
    行 62:  tabIndex="16" runat="server" Width="64px" Text="下一步"></asp:button><INPUT onkeypress="onlyNum()" id="Textbox11" onblur="filterInput()" onkeyup="filterInput()"
    行 63:  style="Z-INDEX: 138; LEFT: 819px; WIDTH: 104px; POSITION: absolute; TOP: 107px; HEIGHT: 23px" tabIndex="4" onbeforeupdate="filterPaste()" type="text" size="12"
     源文件: d:\inetpub\wwwroots\orderformInput\WebForm1.aspx    行: 61
      

  5.   

    Response.Redirect(WebForm2.aspx);是后台代码,
    而onclick好象是在前台执行吧,后台代码怎么可能在前台执行呢?如果你用Response.Redirect(WebForm2.aspx);
    你可以把它放到
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Response.Redirect(WebForm2.aspx)
    End Sub你也可以不用提交页面,在前台执行
    你在PAGE&#717;LOAD中添加
    Button1.Attributes.Add("onclick", "javascript:window.location=’ WebForm2.aspx’”);
      

  6.   

    用Response.Wirte("<script>window.open('abc.aspx')</script>")   //这是新开窗口~
    会出现错误的提示:Wirte”不是“System.Web.HttpResponse”的成员。 wangdequan1024(紫夜)你知道为什么???麻烦解决
      

  7.   

    在后台:
    private void Page_Load(object sender, System.EventArgs e)
    {
                      Button1.Attributes["onclick"]="<script>window.open('WebForm1.aspx')</script>";
                      }
      

  8.   

    Response.write("<script>window.open('abc.aspx')</script>")