⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 js代码与asp代码结合生成html文件.txt

📁 较为详细的介绍了asp自定义的各种函数,方便asp的各种开发.
💻 TXT
字号:
<script language="javascript" src="menu.asp"></script>
menu.asp

javastr=""   
javastr=javastr+"<table width=\"100%\" border=\"0\">"
<!--#include file="articleconn.asp"-->
<%
tjnews=request("tjnews")
if tjnews=""  then
sql="select * from type order by typetime"
set rs=conn.execute(sql)%>
<%
while not rs.eof
'if rs("type") <>"黑客教学" and rs("type") <>"技术文摘" then
%>

javastr=javastr+" <font color=\"#000000\" size=\"2\"> - </font><span style=\"font-size:9pt;line-height: 15pt\"><a href=\"more.asp?ttt=<%=rs("typeid")%>&sss=<%=rs("type")%>\")><%=rs("type")%></span></a>"
<%'end if
rs.movenext
wend
rs.close   
set rs=nothing   
conn.close   
set conn=nothing %> 
javastr=javastr+"</table>"    
document.write (javastr)   
<%else%>
document.write ("对不起,暂时没有任何内容。")   
<%end if%>
 




<script language="javascript" src="tjnews.asp?tjnews=1"></script>
tjnews.asp


javastr="<style>A.menu2{text-decoration: none;color:#000099;line-height: 25pt;font-size:9pt} A.menu2:hover {text-decoration: none;line-height: 25pt;font-size:9pt;color: #ffffff}A.menu2:visited {color:#FF66cFF;line-height: 25pt;font-size:9pt}</style>"
javastr=javastr+"<table width=\"100%\" border=\"0\">"
<!--#include file="articleconn.asp"-->
<%tjnews=request("tjnews")
if tjnews<> ""  then
sql="select top 5 * from article where shenghe=1 and tjnews="+cstr(tjnews)+" order by dateandtime desc"
set rs=conn.execute(sql)%>
<% 
while not rs.eof
%>
javastr=javastr+"<tr><td>"
javastr=javastr+"<font color=\"#000000\" size=\"2\">- </font><span style=\"font-size:9pt;line-height: 15pt\"><a href=\"open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>\") ><%=rs("title")%></span></a>"


javastr=javastr+"</td></tr>"
<%rs.movenext 
wend
rs.close   
set rs=nothing   
conn.close   
set conn=nothing %> 
javastr=javastr+"</table>" 
document.write (javastr) 
<%else%>
document.write ("对不起,暂时没有任何内容。")
<%end if%>








<script language="javascript" src="week.asp?week1=2"></script>
week.asp


javastr="<style>A.menu2{text-decoration: none;color:#000099;line-height: 25pt;font-size:9pt} A.menu2:hover {text-decoration: none;line-height: 25pt;font-size:9pt;color: #ffffff}A.menu2:visited {color:#FF66cFF;line-height: 25pt;font-size:9pt}</style>"
javastr=javastr+"<table width=\"100%\" border=\"0\">"
<!--#include file="articleconn.asp"-->
<%week1=request("week1")
if week1=2  then
sql="select top 10 * from article where shenghe=1 and dateandtime>=date()-6 order by hits desc"
set rs=conn.execute(sql)%>
<% 
dim i
do while not rs.eof 
%>
javastr=javastr+"<tr><td>"
javastr=javastr+"<font color=\"#000000\" size=\"2\">- </font><span style=\"font-size:9pt;line-height: 15pt\"><a href=\"open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>\") ><%=rs("title")%></span></a>"


javastr=javastr+"</td></tr>"
<%i=i+1
	if i=5 then exit do
	rs.movenext
	loop
rs.close   
set rs=nothing   
conn.close   
set conn=nothing %> 
javastr=javastr+"</table>" 
document.write (javastr) 
<%else%>
document.write ("对不起,暂时没有任何内容。")
<%end if%>









<script language="javascript" src="news.asp?newstype=编程技术&typeid=8&n=15"></script>
news.asp


javastr="<style>A.menu2{text-decoration: none;color:#000099;line-height: 25pt;font-size:9pt} A.menu2:hover {text-decoration: none;line-height: 25pt;font-size:9pt;color: #ffffff}A.menu2:visited {color:#FF66cFF;line-height: 25pt;font-size:9pt}</style>"
javastr=javastr+"<table width=\"100%\" border=\"0\">"
<!--#include file="articleconn.asp"-->
<%newstype=request("typeid")
n=request("n")
if newstype<> "" then
sql="select  * from article where shenghe=1 and typeid="+cstr(newstype)+" order by dateandtime desc"
set rs=conn.execute(sql)%>
<% 
do while not rs.eof 
%>
javastr=javastr+"<tr><td>"
javastr=javastr+"<font color=\"#000000\" size=\"1\">·</font><span style=\"font-size:9pt;line-height: 15pt\"><%if rs("selectpic") = 1 then%>[图文]<%end if%><a href=\"open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>\") target=\"_blank\" ><%=rs("title")%></span></a><font color=\"#999999\" font size=\"1\">(<%=rs("dateandtime")%>)(阅读:<%=rs("hits")%>)</font>"
javastr=javastr+"</td></tr>"
<%n=n-1
if n<1 then exit do
rs.movenext 
loop
%> 
<% if n<1 then %>

<% end if %>
<%rs.close   
set rs=nothing   
conn.close   
set conn=nothing%>
document.write (javastr) 
<%else%>
document.write ("对不起,暂时没有任何内容。")
<%end if%>




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -