关于easyui的问题

Cd_Empty 2013-09-27 09:31:26
主页面是
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="main.aspx.cs" Inherits="main" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" href="css/StyleSheet.css" type="text/css" />
<link rel="stylesheet" href="jquery-easyui-1.3.4/themes/default/easyui.css" type="text/css" />
<link rel="stylesheet" href="jquery-easyui-1.3.4/themes/icon.css" type="text/css" />
<script type="text/javascript" src="jquery-easyui-1.3.4/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.4/jquery.easyui.min.js"></script>
</head>
<body class="easyui-layout">
<div id="west_div" data-options="region:'west',href:'west.aspx',split:'true',title:'菜单'" style="width:200px;" ></div>
<div data-options="region:'center',href:'center.aspx'" ></div>
<div data-options="region:'north',href:'north.aspx'" style="height:150px"></div>
</body>
</html>


里面的north.aspx页面是
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="north.aspx.cs" Inherits="west" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" href="css/StyleSheet.css" type="text/css" />
<%--<script type="text/javascript" src="js/time.js"></script>--%>
</head>
<body class="northbody">
<script type="text/javascript">
//定义一个tick函数,以获取系统的时间
function tick()
{
var year,month,day,hours,minutes,seconds,ap;
var intYear,intMonth,intDay,intHours,intMinutes,intSeconds;
var today;
today=new Date();
intYear=today.getFullYear();
intMonth=today.getMonth()+1;
intDay=today.getDate();
intHours=today.getHours();
intMinutes=today.getMinutes();
intSeconds=today.getSeconds();
//获取系统时间的小时数
if(intHours==0)
{
hours=intHours+":";
ap="凌晨";
}
else if(intHours<12)
{
hours=intHours+":";
ap="早晨";
}
else if(intHours==12)
{
hours=intHours+":";
ap="中午";
}
else
{
hours=intHours+":";
ap="下午";
}
//获取系统时间的分数
if(intMinutes<10)
{
minutes="0"+intMinutes+":";
}
else
{
minutes=intMinutes+":";
}
//获取系统时间的秒数
if(intSeconds<10)
{
seconds="0"+intSeconds+" ";
}
else
{
seconds=intSeconds+" ";
}
timeString=intYear+'年'+intMonth+'月'+intDay+'日'+hours+minutes+seconds+ap;
lab_time.innerHTML=timeString;
//每隔0.1秒钟执行一次tick函数
window.setTimeout("tick()",100);
}
window.onload=tick;
</script>
<div class="datebar">
<table>
<tr>
<td>现在是:</td>
<td><asp:Label ID="lab_time" runat="server"></asp:Label></td>
</tr>
</table>
</div>
<div class="userbar">
<table>
<tr>
<td>欢迎您:</td>
<td style="width:200px"><asp:Label ID="Label2" runat="server" Text=""></asp:Label></td>
<td class="td_btn"><a>重新登录</a></td>
<td class="td_btn"><a>修改密码</a></td>
<td class="td_btn"><a>退出系统</a></td>
</tr>
</table>
</div>
</body>
</html>


问题是,单独运行子页面可以显示时间
如果是主页面的话,用浏览器(firefox)打开的话有时刷新就可以看见(IE不行...)
但主页面F5运行的时候firefox也看不到了...为什么呢...
...全文
141 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Cd_Empty 2013-09-28
  • 打赏
  • 举报
回复
引用 1 楼 fzfei2 的回复:
north.aspx 67 行 lab_time.innerHTML=timeString; 改成 document.getElementById("lab_time").innerHTML=timeString;
主页面运行还是看不见...改和不改的效果一样
fzfei2 2013-09-27
  • 打赏
  • 举报
回复
north.aspx 67 行 lab_time.innerHTML=timeString; 改成 document.getElementById("lab_time").innerHTML=timeString;

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧