页顶导航条示例
类别: ASP教程
\'nav1.asp
<%
option explicit
dim out,tar
dim fontcolor,bordercolor,bgcolor
if Request.QueryString ("bgcolor")="" then
bgcolor="#ffffff"
else
bgcolor=Request.QueryString ("bgcolor")
end if
if Request.QueryString ("fontcolor")="" then
fontcolor="#666666"
else
fontcolor=Request.QueryString ("fontcolor")
end if
if Request.QueryString ("bordercolor")="" then
bordercolor="#000000"
else
bordercolor=Request.QueryString ("bordercolor")
end if
tar=trim(Request.QueryString ("action"))
\'if tar="" then
\' tar="home"
\'end if
\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'
out = "<table border=""0"" width=""100%"" style=""font-family: 宋体; font-size: 10pt; color: " & fontcolor & ";border:1 solid " & bordercolor & """ cellspacing=""0"" bgcolor=""" & bgcolor &""">"
out = out & " <tr>"
\'\'\'\'\'\'
out = out & " <td align=""center"" valign=""middle"" width=""11%"">"
if tar<>"home" then
out = out & " <a href=""http://www.4ico.com/index.html"" target=_top>主页"
else
out = out & " <font color=""#ff0000"">主页"
end if
out = out & " </td>"
\'\'\'\'\'\'\'\'\'\'\'\'\'
out = out & " <td align=""center"" valign=""middle"" width=""11%"">"
if tar<>"news" then
out = out & " <a href=""http://news.4ico.com/index.html"" target=_top>新闻"
else
out = out & " <font color=""#ff0000"">新闻"
end if
out = out & " </td>"
\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'
....
....
...
out = out & " </tr>"
out = out & "</table>"
\'
Response.Write "document.write(\'" & out & "\')"
%>
用
<script language="JavaScript1.1" src="http://www.4ico.com/navigator/nav1.asp?action=home"></script>
引用。
<%
option explicit
dim out,tar
dim fontcolor,bordercolor,bgcolor
if Request.QueryString ("bgcolor")="" then
bgcolor="#ffffff"
else
bgcolor=Request.QueryString ("bgcolor")
end if
if Request.QueryString ("fontcolor")="" then
fontcolor="#666666"
else
fontcolor=Request.QueryString ("fontcolor")
end if
if Request.QueryString ("bordercolor")="" then
bordercolor="#000000"
else
bordercolor=Request.QueryString ("bordercolor")
end if
tar=trim(Request.QueryString ("action"))
\'if tar="" then
\' tar="home"
\'end if
\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'
out = "<table border=""0"" width=""100%"" style=""font-family: 宋体; font-size: 10pt; color: " & fontcolor & ";border:1 solid " & bordercolor & """ cellspacing=""0"" bgcolor=""" & bgcolor &""">"
out = out & " <tr>"
\'\'\'\'\'\'
out = out & " <td align=""center"" valign=""middle"" width=""11%"">"
if tar<>"home" then
out = out & " <a href=""http://www.4ico.com/index.html"" target=_top>主页"
else
out = out & " <font color=""#ff0000"">主页"
end if
out = out & " </td>"
\'\'\'\'\'\'\'\'\'\'\'\'\'
out = out & " <td align=""center"" valign=""middle"" width=""11%"">"
if tar<>"news" then
out = out & " <a href=""http://news.4ico.com/index.html"" target=_top>新闻"
else
out = out & " <font color=""#ff0000"">新闻"
end if
out = out & " </td>"
\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'
....
....
...
out = out & " </tr>"
out = out & "</table>"
\'
Response.Write "document.write(\'" & out & "\')"
%>
用
<script language="JavaScript1.1" src="http://www.4ico.com/navigator/nav1.asp?action=home"></script>
引用。
- 上一篇: 简单析取HTML文件实例
- 下一篇: 使用AD ROTATOR组件
-= 资 源 教 程 =-
文 章 搜 索