ASP实例:幻灯片新闻代码
以下为引用的内容:
<!--这是一个主页文件-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>幻灯片新闻</title>
</head>
<body>
<!--#Include file="diaoyong.asp"-->
</body>
</html>
<!--
只要调用下面这个文件就可以了
这是一个文件名为:diaoyong.asp的文件
flash文件在符件里面
-->
<%
'幻灯片新闻
Db="../webjx_Data/webjx_Data.Asp"
Set conn = Server.CreateObject("ADODB.Connection")
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
Conn.Open Connstr
sql="select top 5 * from [Music_List_Tupian_System] where IswNumsSex='轮换广告' order by IswNumsID desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
k=1
Num_total=rs.recordcount
for i=1 to 5
if i>Num_total then exit for
if i=1 then
imgUrl11="Img/"&rs("IswNumsPhoto")
if len(rs("IswNumsUser"))>=18 then
imgtext11= left(rs("IswNumsUser"),18)&"..."
else
imgtext11=rs("IswNumsUser")
end if
imgLink11=rs("IswNumsClass")
end if
if i=2 then
imgUrl22="Img/"&rs("IswNumsPhoto")
if len(rs("IswNumsUser"))>=18 then
imgtext22= left(rs("IswNumsUser"),18)&"..."
else
imgtext22=rs("IswNumsUser")
end if
imgLink22=rs("IswNumsClass")
end if
if i=3 then
imgUrl33="Img/"&rs("IswNumsPhoto")
if len(rs("IswNumsUser"))>=18 then
imgtext33= left(rs("IswNumsUser"),18)&"..."
else
imgtext33=rs("IswNumsUser")
end if
imgLink33=rs("IswNumsClass")
end if
if i=4 then
imgUrl44="Img/"&rs("IswNumsPhoto")
if len(rs("IswNumsUser"))>=18 then
imgtext44= left(rs("IswNumsUser"),18)&"..."
else
imgtext44=rs("IswNumsUser")
end if
imgLink44=rs("IswNumsClass")
end if
if i=5 then
imgUrl55="Img/"&rs("IswNumsPhoto")
if len(rs("IswNumsUser"))>=18 then
im
相关文档:
本文链接:http://www.oversteper.com/wprogram/asp/828.html
条件语句之 select case 语句
1、多条件分支的时候优先使用select case结构;
2、数字的大量列举时最好使用select case
3、必须使用 end select 来结束分支结构
示例:
以下为 ......
index.asp文件 保存utf-8
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<form id="form1" name="form1" method="post">
<input name="ip" type="text" id="ip" style="width:170px" />
</form>
<mce:script type="text/javascript" src="ajaxrequest-m ......
1、控制"纵打"、 横打”和“页面的边距。
(1)<script defer>
function SetPrintSettings() {
// -- advanced features
factory.printing.SetMarginMeasure(2) // measure margins in inches
factory.SetPageRange(false, 1, 3) // need pages from 1 to 3
factory.printing.printer = "HP De ......
相信我的,只有我才真正地找过答案,其它都是乱抄的,实能解决到你的问题,前个月我还在苦找答案,也已试验过N次,最后成功了,网上也有改那个什么帐户的,那个实在太难了.
按我的方法,前提是一,系统是XP,其它系统不敢包.二,你没有做过其它设置.
主要是帐户权限问题.
打开“管理工具”->“组件服务”- ......
'显示"上一页 下一页":链接地址,总数,页数,是否显示总数,是否用下拉列表跳转,单位
Public Function PageControl(iCount,pagecount,page,table_style,font_style,colspan)
'生成上一页下一页链接
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request. ......