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
相关文档:
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 ......
转自: http://www.cnblogs.com/rentj1/archive/2009/02/23/1396187.html
1 新建类库MyTestDLL
2 右击项目“MyTestDLL”-》属性-》生成-》勾选“为COM互操作注册”
3 打开 AssemblyInfo.cs 文件 修改 [assembly: ComVisible(true)]
4 打开Visual Sutdio 2008 的命令提示行工具输入guidgen.exe 选择D ......
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 ......
如id="a/b/c/asdf.html" 参数为动态
怎么把后面的asdf.html过滤?使id="a/b/c/"?
如果id的格式一定为 "????/????/??????/xxxx.xxx"
即最后所要过滤掉的一定是最后一个"/"之后的内容
可以用如下方法:
<%
URL="a/b/c/asdf.html"
PartOfURL=split(URL,"/") '将字符串以"/"分割
UnNeed=spli ......
'显示"上一页 下一页":链接地址,总数,页数,是否显示总数,是否用下拉列表跳转,单位
Public Function PageControl(iCount,pagecount,page,table_style,font_style,colspan)
'生成上一页下一页链接
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request. ......