长标题,只读取前几个文字代码
[ 2006-04-30 22:20:41 | 作者: kite ]
‘连接数据库
<%
Set conn = Server.CreateObject("ADODB.Connection")
Strconn="DRIVER={Microsoft Access Driver (*.mdb)}; "
Strconn=Strconn & "DBQ=" & Server.MapPath("manage\liangqichao.mdb")
conn.Open Strconn
%>
'建立记录集
<%
dim bg,rs
bg="select top 7 * from article order by newsid DESC"
set rs=conn.execute(bg)
%>
'读取字段值,其实16就是读取前16个字
<%=left(rs("title"),16)%>
<%
Set conn = Server.CreateObject("ADODB.Connection")
Strconn="DRIVER={Microsoft Access Driver (*.mdb)}; "
Strconn=Strconn & "DBQ=" & Server.MapPath("manage\liangqichao.mdb")
conn.Open Strconn
%>
'建立记录集
<%
dim bg,rs
bg="select top 7 * from article order by newsid DESC"
set rs=conn.execute(bg)
%>
'读取字段值,其实16就是读取前16个字
<%=left(rs("title"),16)%>
ASP中调用RP的代码
[ 2006-04-30 14:37:40 | 作者: kite ]
<OBJECT id=player height=180 width=205 classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA name=player><PARAM NAME="_ExtentX" VALUE="5424"><PARAM NAME="_ExtentY" VALUE="4763"><PARAM NAME="AUTOSTART" VALUE="-1"><PARAM NAME="SHUFFLE" VALUE="0"><PARAM NAME="PREFETCH" VALUE="0"><PARAM NAME="NOLABELS" VALUE="0"><PARAM NAME="SRC" VALUE="音频地址"><PARAM NAME="CONTROLS" VALUE="Imagewindow,StatusBar,ControlPanel"><PARAM ...
阅读全文
阅读全文
ASP中调用MP的第二种方法代码
[ 2006-04-30 14:27:31 | 作者: kite ]
<object id="mplayer" width="460" height="68" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="FileName" value="">
<param name="ShowControls" value="1">
...
阅读全文
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="FileName" value="">
<param name="ShowControls" value="1">
...
阅读全文
asp中调用MP的代码
[ 2006-04-30 14:21:23 | 作者: kite ]
<OBJECT id="PTMediaPlayer" style="WIDTH: 101.45%; HEIGHT: 192px" width="101.45%" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
VIEWASTEXT>
<PARAM NAME="URL" VALUE="音频URL">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
<PARAM ...
阅读全文
VIEWASTEXT>
<PARAM NAME="URL" VALUE="音频URL">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
<PARAM ...
阅读全文
一个简单的ASP后台登录程序
[ 2006-04-30 11:12:42 | 作者: kite ]
一个简单的ASP后台登录程序
点此下载
然后在后台的每一个页面加多以下代码,防止不用帐号和密码就可以登录。
<%
' 检查 Cookie 中的 Passed 变量是否等于 Passed
If Not Request.Cookies("Passed")="Passed" Then
Response.Redirect "admin.asp"
Response.End
End If
%>
然后在后台的每一个页面加多以下代码,防止不用帐号和密码就可以登录。
<%
' 检查 Cookie 中的 Passed 变量是否等于 Passed
If Not Request.Cookies("Passed")="Passed" Then
Response.Redirect "admin.asp"
Response.End
End If
%>
一个代码简单而可动态显示动态时间的代码
[ 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>








心月湖
青草荷塘