阅读424 返回首页    go 阿里云 go 技术社区[云栖]


frameset应用例子——利用javascript跳转

 

index

<html xmlns="https://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<frameset cols="10%,*">
<frame src="1.aspx" noresize="noresize" name="frame1" frameborder="0" />
<frame src="2.aspx" noresize="noresize" name="frame2" frameborder="0" />
</frameset>
</html>

 

1.aspx

<body>
    <form runat="server" target="frame2">
    <div>
        <asp:TextBox ID="TextBox1" runat="server">https://www.baidu.com</asp:TextBox><br />
        <br /><br />
        <asp:Button ID="Button1" runat="server" Text="转向网址" />
    </div>
    </form>
</body>

 

1.cs

    public partial class _1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect(this.TextBox1.Text);
        }
    }

 

2.aspx

<body>
    <form runat="server">
    <div>
   
    </div>
    </form>
</body>

 

当点击按钮时,1.aspx中文本框的网址,将在2.aspx中显示!

最后更新:2017-04-02 22:16:01

  上一篇:go 事务使用时MSDTC不可用解决办法
  下一篇:go Jquery中BlockUI的详解