一个代码简单而可动态显示动态时间的代码
[ 2006-04-30 10:50:55 | 作者: kite ]
<DIV id=jnkc></DIV>
<SCRIPT>setInterval("jnkc.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt (new Date().getDay());",1000);</SCRIPT>
<SCRIPT>setInterval("jnkc.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt (new Date().getDay());",1000);</SCRIPT>
显示日期与时间的代码,可以在指定日期是什么节日
[ 2006-04-30 00:18:52 | 作者: kite ]
<SCRIPT language=javascript>
<!--
calendar = new Date();
day = calendar.getDay();
month = calendar.getMonth();
date = calendar.getDate();
year = calendar.getYear();
if (year< 100) year = 1900 + year;
cent = parseInt(year/100);
g = year % 19;
k = parseInt((cent - 17)/25);
i = (cent - parseInt(cent/4) - parseInt((cent - k)/3) + 19*g + 15) % 30;
i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1))*parseInt((21-g)/11));
...
阅读全文
<!--
calendar = new Date();
day = calendar.getDay();
month = calendar.getMonth();
date = calendar.getDate();
year = calendar.getYear();
if (year< 100) year = 1900 + year;
cent = parseInt(year/100);
g = year % 19;
k = parseInt((cent - 17)/25);
i = (cent - parseInt(cent/4) - parseInt((cent - k)/3) + 19*g + 15) % 30;
i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1))*parseInt((21-g)/11));
...
阅读全文
ASP中动态时间显示
[ 2006-04-27 17:19:37 | 作者: kite ]
<Script language="VBscript">
SetTimeOut "Clock",1000
Sub Clock()
StrNowTime=now()
NowT.InnerHtml=StrNowTime
SetTimeOut "Clock",1000
End Sub
</Script>
<Center id="NowT"></Center>
SetTimeOut "Clock",1000
Sub Clock()
StrNowTime=now()
NowT.InnerHtml=StrNowTime
SetTimeOut "Clock",1000
End Sub
</Script>
<Center id="NowT"></Center>
文件一:GLOBAL.ASA
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_onStart
Application("OnLine") = 0
End Sub
Sub Session_onStart
Application.Lock
Application("OnLine") = Application("OnLine") + 1
Application.Unlock
End Sub
</SCRIPT>
文件二:COUNTER.ASP
<%@language=VBscript%>
<Html>
<head>
<title>
防止刷新的计数器
</title>
</head>
<body>
<center>
<font color=blue size=5>
...
阅读全文
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_onStart
Application("OnLine") = 0
End Sub
Sub Session_onStart
Application.Lock
Application("OnLine") = Application("OnLine") + 1
Application.Unlock
End Sub
</SCRIPT>
文件二:COUNTER.ASP
<%@language=VBscript%>
<Html>
<head>
<title>
防止刷新的计数器
</title>
</head>
<body>
<center>
<font color=blue size=5>
...
阅读全文
整理了一些ASP初学者常用的代码
[ 2006-04-27 13:20:37 | 作者: kite ]
1.获得系统时间:
<%=now()%>
2.取得来访用的IP:
<%=request.serverVariables("remote_host")%>
3.获得系统,浏览器版本:
<script>
window.document.write("版本:"+navigator.appName+navigator.appVersion+" browser.")
</script>
4.去除IE混动条:
<body scroll="no">
<body style="overflow-y:hidden">
5.进入网站,跳出广告:
<script language="javascript">
<!--
<!-- 注意更改文件所在路径-->
window.open(''http://www.XXXXXX.com'','''',''height=200,width=300,top=0,left=30'');
...
阅读全文
<%=now()%>
2.取得来访用的IP:
<%=request.serverVariables("remote_host")%>
3.获得系统,浏览器版本:
<script>
window.document.write("版本:"+navigator.appName+navigator.appVersion+" browser.")
</script>
4.去除IE混动条:
<body scroll="no">
<body style="overflow-y:hidden">
5.进入网站,跳出广告:
<script language="javascript">
<!--
<!-- 注意更改文件所在路径-->
window.open(''http://www.XXXXXX.com'','''',''height=200,width=300,top=0,left=30'');
...
阅读全文
SQL语句参考及记录集对象详解
[ 2006-04-27 13:18:37 | 作者: kite ]
1. ASP与Access数据库连接:
<%@ language=VBscript%>
<%
dim conn,mdbfile
mdbfile=server.mappath("数据库名称.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};uid=admin;pwd=数据库密码;dbq="&mdbfile
%>
2. ASP与SQL数据库连接:
<%@ language=VBscript%>
<%
dim conn
set conn=server.createobject("ADODB.connection")
con.open "PROVIDER=SQLOLEDB;DATA ...
阅读全文
<%@ language=VBscript%>
<%
dim conn,mdbfile
mdbfile=server.mappath("数据库名称.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};uid=admin;pwd=数据库密码;dbq="&mdbfile
%>
2. ASP与SQL数据库连接:
<%@ language=VBscript%>
<%
dim conn
set conn=server.createobject("ADODB.connection")
con.open "PROVIDER=SQLOLEDB;DATA ...
阅读全文
倒计时一
<%@ Language=VBScript %>
<%
response.write "今天是"
response.write formatDateTime(Date(),1) & ","
'格式化为长日期格式输出显示
response.write " 离高考还有"
response.write "<font color=blue><u>"
'调用DateDiff函数,计算日期间隔.
response.write DateDiff("d",Date(),"08-06-07")
response.write "</font></u>"
response.write "天"
%>
倒计时二
<!-- 倒记时 start -->
...
阅读全文
<%@ Language=VBScript %>
<%
response.write "今天是"
response.write formatDateTime(Date(),1) & ","
'格式化为长日期格式输出显示
response.write " 离高考还有"
response.write "<font color=blue><u>"
'调用DateDiff函数,计算日期间隔.
response.write DateDiff("d",Date(),"08-06-07")
response.write "</font></u>"
response.write "天"
%>
倒计时二
<!-- 倒记时 start -->
...
阅读全文
<script>
var enabled = 0; today = new Date();
var day;
if(today.getDay()==0) day = "星期日"
if(today.getDay()==1) day = "星期一"
if(today.getDay()==2) day = "星期二"
if(today.getDay()==3) day = "星期三"
if(today.getDay()==4) day = "星期四"
if(today.getDay()==5) day = "星期五"
if(today.getDay()==6) day = "星期六"
document.fgColor = "000000";
date = (today.getYear()) + "年" + (today.getMonth() + 1 ) + ...
阅读全文
var enabled = 0; today = new Date();
var day;
if(today.getDay()==0) day = "星期日"
if(today.getDay()==1) day = "星期一"
if(today.getDay()==2) day = "星期二"
if(today.getDay()==3) day = "星期三"
if(today.getDay()==4) day = "星期四"
if(today.getDay()==5) day = "星期五"
if(today.getDay()==6) day = "星期六"
document.fgColor = "000000";
date = (today.getYear()) + "年" + (today.getMonth() + 1 ) + ...
阅读全文








心月湖
青草荷塘