heisetoufa 发表于 2013-2-7 23:13:27

frameset,frame,iframe,框架,点击一个框架内的超链接或按钮在另外的框架里显示

a.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD><TITLE> New Document </TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""> </HEAD><form name="jnkcForm" method="get" action="E:\LmWorks\download\api\CSS 层叠样式表手册 v1.10\CSS 层叠样式表手册 v1.10/1.txt" target="jnkc" >查看帖子<input name="id" value="1311196">号 <input type="submit" name="Submit3" value="提交">   </form>   <IFRAME NAME="jnkc" SRC="about:blank" WIDTH="100%" HEIGHT="300"></IFRAME> <BODY> </BODY></HTML>下边再贴个asp.net的frame.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Iframe.aspx.cs" Inherits="ext_Iframe" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">    <title>无标题页</title>    </head><frameset rows="*" cols="200,*" framespacing="1" frameborder="yes" border="1" bordercolor="#CCCCCC"><frame src="../member/Index.aspx" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" /><frame src="../user/Login.aspx" name="mainFrame" id="mainFrame" title="mainFrame" /><!--需要在这个frame里显示的话,就写上 target="mainFrame"--></frameset><body>    <form id="form1" runat="server">    <div>      </div>    </form></body></html>index.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="index" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">    <title>无标题页</title>    <link rel="stylesheet" type="text/css" href="../css/Frame.css" />    <link rel="stylesheet" type="text/css" href="../css/BackgroundOne.css" /></head><body>    <form id="form1" runat="server">    <div>      <a href="Register.aspx" xml:lang="1" target="mainFrame">黑名单信息录入与查询</a><!--这个target对应需要显示的frami里的name属性-->    </div>    </form></body></html>Login.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="login" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">    <title>用户登录</title>      <link rel="stylesheet" type="text/css" href="../css/Frame.css" />    <link rel="stylesheet" type="text/css" href="../css/BackgroundTwo.css" /></head><body>    <form id="form1" runat="server">   <div valign="middle">         <table valign="center" align="center" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#003366" bordercolordark="#ffffff">      <tr id="addData_TR" class="STYLE1" >                <td colspan="2" align="center">            电子警察卡口</td>      </tr>      <tr class="STYLE1">      <td>用户名:</td>      <td><input name="userName" type="text" id="Txt_LoginName" runat="server"/>            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Txt_LoginName"                ErrorMessage="请输入用户名!">*</asp:RequiredFieldValidator></td>      </tr>      <tr class="STYLE1">      <td>            密    码:</td>      <td><input name="psw" type="password" id="Txt_Password" runat="server" style="width: 149px"/>            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Txt_Password"                ErrorMessage="请输入密码!">*</asp:RequiredFieldValidator></td>      </tr>      <tr>      <td colspan="2" align="center" style="height: 26px">            <asp:Button ID="Button1" runat="server"Text="登 录" />                <input type="button" value="关 闭"/>      </td>      </tr>    </table>    </div>    </form><script type="text/javascript">var oUserId = document.getElementById("Txt_LoginName");var oPwd = document.getElementById("Txt_Password");window.onload = function(){    oUserId.focus();    oUserId.onkeydown = function ()    {   if(event.keyCode == 13 ) oPwd.focus();    }}</script></body></html> Register.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">    <title>无标题页</title>    <link rel="stylesheet" type="text/css" href="../css/Frame.css" />    <link rel="stylesheet" type="text/css" href="../css/BackgroundTwo.css" /></head><body>    <form id="form1" runat="server">    <div>      <asp:CheckBox ID="CheckBox1" runat="server" />有效期:<input runat="server" id="txt_yxq" type="text" />      <asp:CheckBox ID="CheckBox2" runat="server" />违法性质:      <asp:TextBox ID="txt_wfxz" runat="server"></asp:TextBox><br />      <asp:CheckBox ID="CheckBox3" runat="server" />号牌种类:<asp:DropDownList ID="DropDownList2"            runat="server">      </asp:DropDownList>      <asp:CheckBox ID="CheckBox4" runat="server" />号牌号码:      <asp:TextBox ID="txt_hphm" runat="server"></asp:TextBox><br />      <asp:CheckBox ID="CheckBox5" runat="server" />违法类型:<asp:DropDownList ID="DropDownList3"            runat="server">      </asp:DropDownList>      <asp:CheckBox ID="CheckBox6" runat="server" />发动机号:      <asp:TextBox ID="txt_fdjh" runat="server"></asp:TextBox><br />      <asp:CheckBox ID="CheckBox7" runat="server" />车辆品牌:<asp:TextBox ID="txt_clpp" runat="server"></asp:TextBox>      <asp:CheckBox ID="CheckBox8" runat="server" />车驾号:      <asp:TextBox ID="txt_cjh" runat="server"></asp:TextBox><br />      <asp:CheckBox ID="CheckBox9" runat="server" />所有人:<asp:TextBox ID="txt_syr" runat="server"></asp:TextBox>      <asp:CheckBox ID="CheckBox10" runat="server" />车辆类型:<asp:DropDownList ID="DropDownList4"            runat="server">      </asp:DropDownList><br />      <asp:CheckBox ID="CheckBox11" runat="server" />车身颜色:<asp:DropDownList ID="DropDownList5"            runat="server">      </asp:DropDownList>      <asp:DropDownList ID="DropDownList6" runat="server">      </asp:DropDownList><br />      <asp:CheckBox ID="CheckBox12" runat="server" />备注:<br />      <asp:TextBox ID="txt_bz" runat="server" Height="125px" TextMode="MultiLine" Width="402px"></asp:TextBox><br /><br />                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>      <input id="insert" runat="server" type="submit" value="加入黑名单列表" onserverclick="insert_ServerClick" /><br />      <br />       动态下拉:                <asp:DropDownList ID="DropDownList1" runat="server" >      </asp:DropDownList>                        </div>    </form></body></html> 
黑色头发  http://heisetoufa.iteye.com
页: [1]
查看完整版本: frameset,frame,iframe,框架,点击一个框架内的超链接或按钮在另外的框架里显示