Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Response.Write("<script language=javascript>document.all('fr1').src='TestDoPostBack.aspx'</script>") RegisterStartupScript("key", "<script>document.all('fr1').src='TestDoPostBack.aspx'</script>") End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click RegisterStartupScript("key", "<script>document.all('fr1').src='RemoveListBox.aspx'</script>") End Sub
frame1.location.replace('frame.htm?paras=参数(iFrame根据这个参数改变内容)');
</script>
<iFrame name="frame1" src="frame.htm"></iFrame>
frame1.location.href='www.sohu.com'
</script>
<iFrame name="frame1" src="frame.htm"></iFrame>
function getTitle()
{
document.all("s").innerText=document.all("fr1").src;
//alert(window.frames["fr1"].document.all("Listbox1").options.length);
}
</script>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button2" style="Z-INDEX: 103; LEFT: 304px; POSITION: absolute; TOP: 456px" runat="server"
Text="RemoveListBox.aspx"></asp:Button>
<div id="big" onmouseover="getTitle();"><iframe onfocus="getTitle();" onblur="document.all('s').innerText=''" frameborder="1" id="fr1"
src="IFramesendvalue.aspx" width="80%" style="WIDTH: 80.13%; HEIGHT: 376px"></iframe>
</div>
<DIV id="s" style="FONT-SIZE: 12px; Z-INDEX: 101; LEFT: 10px; WIDTH: 80%; COLOR: white; FONT-FAMILY: Verdana; POSITION: absolute; TOP: 400px; HEIGHT: 36px; BACKGROUND-COLOR: royalblue"
ms_positioning="GridLayout">Show the title of Page in Iframe
</DIV>
<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 88px; POSITION: absolute; TOP: 456px" runat="server"
Text="TestDoPostBack.aspx"></asp:Button>
<INPUT id ="getvc" style="Z-INDEX: 104; LEFT: 520px; POSITION: absolute; TOP: 456px" type="text">
</form>
</body>
ms_positioning="FlowLayout">
<iframe id="proframe" src ="ProTree.aspx?pro_name=01" style="WIDTH: 216px; HEIGHT: 200px"></iframe>
</DIV>
proframe 没有location.href属性啊!?
'Put user code to initialize the page here
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Response.Write("<script language=javascript>document.all('fr1').src='TestDoPostBack.aspx'</script>")
RegisterStartupScript("key", "<script>document.all('fr1').src='TestDoPostBack.aspx'</script>")
End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
RegisterStartupScript("key", "<script>document.all('fr1').src='RemoveListBox.aspx'</script>")
End Sub