如何把下面这段asp代码转换成可用js调用的代码
<!--#includefile="include/conn.asp"--><%DimRs,sqlSetRs=Server.CreateObject("adodb.rec...
<!--#include file="include/conn.asp"-->
<%
Dim Rs,sql
Set Rs=Server.CreateObject("adodb.recordset")
sql="select * from bigclass where bigclassid=1"
set rst=server.createobject("adodb.recordset")
Rs.open sql,conn,1,1
if Rs.eof then
Response.write("表没有数据")
else
bigclassid = rs("BigClassID")
bigclassname =rs("BigClassName")
Rs.close()
sql = "select top 6 * from news where BigClassName = '"&bigclassname&"'"
Rs.open sql,conn,1,1
do while not Rs.eof
response.Write("<a href='1.asp'>"&left(rs("Title"),13)&"...</a><br/>")
Rs.movenext
loop
end if
Rs.close()
Set Rs=nothing
%>
是ASP转为JS代码,然后用<script language="javascript" src="11.asp"></script>调到HTML页面上面 展开
<%
Dim Rs,sql
Set Rs=Server.CreateObject("adodb.recordset")
sql="select * from bigclass where bigclassid=1"
set rst=server.createobject("adodb.recordset")
Rs.open sql,conn,1,1
if Rs.eof then
Response.write("表没有数据")
else
bigclassid = rs("BigClassID")
bigclassname =rs("BigClassName")
Rs.close()
sql = "select top 6 * from news where BigClassName = '"&bigclassname&"'"
Rs.open sql,conn,1,1
do while not Rs.eof
response.Write("<a href='1.asp'>"&left(rs("Title"),13)&"...</a><br/>")
Rs.movenext
loop
end if
Rs.close()
Set Rs=nothing
%>
是ASP转为JS代码,然后用<script language="javascript" src="11.asp"></script>调到HTML页面上面 展开
1个回答
展开全部
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询