ASP.NET 页面中 滚动当前系统时间
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Admin_Default3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script language="javascript" type ="text/javascript">
function tick()
{
var hours, minutes, seconds, xfile;
var intHours, intMinutes, intSeconds;
var today, theday;
today = new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i] }
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
theday = today.getYear()+"年" + [today.getMonth()+1]+"月" +today.getDate() + d[today.getDay()+1];
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
if (intHours == 0) {
hours = "12:";
xfile = "午夜";
} else if (intHours <12) {
hours = intHours+":";
xfile = "上午";
} else if (intHours == 12) {
hours = "12:";
xfile = "正午";
} else {
intHours = intHours - 12
hours = intHours + ":";
xfile = "下午";
}
if (intMinutes <10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
timeString = theday+xfile+hours+minutes+seconds;
var textNode=document.createTextNode(timeString); //create拼写
currentElement=document.getElementById("time");
currentElement.replaceChild(textNode,currentElement.firstChild);
setTimeout("tick()",1000);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body onload="tick()">
<form id="form1" runat="server">
<MARQUEE id="time" scrollA
相关文档:
在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["login"] != null)
&nb ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace pub.mo
{
public class request
{
private request() { }
/// <summary>
/// 获取session
/// </summary>
/// <param name="_session_name" ......
以.aspx\.asp\.php结尾的页伪静态为以.htm或者.html结尾的页有什么看法,性能会得到提高吗,有什么好处?
那么或者直接生成静态页面又有什么好处,是否推荐在一个网站大量使用呢?
对于腾讯那样的大的门户网站他们的新闻页是生成的静态页呢或者是伪装的?
最佳答案:
运行PHP,ASP.NET,JSP,ColdFusion的网页服务器(如IIS,A ......