<% ... @ Page Language="C#" %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < script runat ="server" > ... protected void Button1_Click(object sender, EventArgs e) ...{ iframe1.Attributes["src"] = @"http://blog.csdn.net/wkjs"; iframe1.Style["height"] = "600px"; } </ script > < html xmlns ="http://www.w3.org/1999/xhtml" > < head runat ="server" > < title > iframe之間調用 </ title > </ head > < body > < form id ="form1" runat ="server" > < iframe src ="http://blog.csdn.net/wkjs" frameborder ="0" style ="height:400px; width:600px; left:100px; top:100px; position:absolute" runat ="server" id ="iframe1" ></ iframe > < asp:Button ID ="Button1" runat ="server" OnClick ="Button1_Click" Text ="我的地盤" /> </ form > </ body > </ html >