现在有Frame.aspx页面和right.aspx页面
Frame.aspx页面有一个Lablel2,在Frame.aspx页面里嵌套一个Iframe 指向right.aspx,
代码:<iframe id="chatmain" src="right.aspx" frameborder="0" marginheight="0" marginwidth="0" width="134" scrolling="no" ></iframe>
现在我想要做的是在right.aspx这个页面里修改Frame.aspx页面里的Lablel2的值,通过代码或者js都行,请高手帮忙解决一下
<iframe id="I1" frameborder="0" height="18" marginheight="0" marginwidth="0"
name="I1" scrolling="no" src="welcom.aspx" width="800"></iframe>
这是我曾经做的例子,这里显示人的姓名当前日期等你看看:是在welcom里load事件写的,你的值当然可以在这里绑定了
Response.Write("<marquee direction=left height=20 scrollamount=2 scrolldelay=20 width=815 onmouseover='this.stop()' onmouseout='this.start()' >");
string year = System.DateTime.Now.Year.ToString();
string month = System.DateTime.Now.Month.ToString();
string day = System.DateTime.Now.Day.ToString();
string week = System.DateTime.Now.DayOfWeek.ToString ();
string chinese = string.Empty;
switch (week)
{
case "SunDay":
chinese = "星期天";
break;
case "Monday": chinese = "星期一";
break;
case "Tuesday": chinese = "星期二";
break;
case "Wednesday": chinese= "星期三";
break;
case "Thursday": chinese = "星期四";
break;
case "Friday": chinese = "星期五";
break;
case "Saturday": chinese = "星期六";
break;
}
Response.Write("<div style ='font-size :14px; font-family :华文仿宋;color:#FF3333'>当前用户是:" + UserName + "," + " 今天是" + year + "年" + month + "月" + day + "日," + chinese + "</div>");
Response.Write("</marquee>");
希望对你有帮助吧