会JS代码的进
帮我看看那里错了,首页JS调用不出来不显示内容,文件名为news.asp
文件代码为:
javastr="<style>A.menu2{text-decoration: none;color:#000099;line-height: 12pt;font-size:9pt} A.menu2:hover {text-decoration: none;line-height: 12pt;font-size:9pt;color: #ffffff}A.menu2:visited {color:#FF66cFF; 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=\"#6687BA\"> □ </font><span style=\"font-size:9pt;line-height: 13pt\"><a href=\"open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>\") target=\"_blank\"><%=rs("title")%></span></a><font color=\"#ff0000\"><%if rs("selectpic")= 1 then%>[图]<%end if%></font><font color=\"#666666\" 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 %>
javastr=javastr+"</table><span style=\"font-size:9pt;line-height: 13pt\"> <a href=\"more.asp?ttt=<%=rs("typeid")%>&sss=<%=rs("typename")%>\"target=\"_blank\">>>> 更多内容</span></a>"
<% end if %>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
document.write (javastr)
<%else%>
document.write ("对不起,暂时没有任何内容。")
<%end if%>
首页JS调用代码:
<tr>
<td height="2" bgcolor="#FFFFFF">
<script language="javascript" src="news.asp?newstype=????&typeid=43&n=6"></script> </td>
</tr>
sql="select* from article where shenghe=1 and typeid="+cstr(newstype)+" order by dateandtime desc"
检查sql语句我觉得是这里的错,如果没有那么你
response.write(">>>")
response.end
慢慢设置断点调试 好的谢谢 头都看晕了 有必要全用java输出么 什么乱七八糟的 :L
页:
[1]