找回密码
 注册
【阿里云】2核2G云服务器新老同享 99元/年,续费同价,云服务器3年机/5年机限时抢购,低至 2.5折华为云精选云产品特惠糖果主机Jtti,新加坡服务器,美国服务器,香港服务器,海外云服务器
查看: 530|回复: 3

会JS代码的进

[复制链接]
发表于 2008 年 12 月 10 日 17:39:47 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
帮我看看那里错了,首页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>

Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
发表于 2008 年 12 月 10 日 21:18:07 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
sql="select  * from article where shenghe=1 and typeid="+cstr(newstype)+" order by dateandtime desc"

检查sql语句我觉得是这里的错,如果没有那么你
response.write(">>>")
response.end
慢慢设置断点调试
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2008 年 12 月 11 日 09:26:30 | 显示全部楼层
好的谢谢
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2008 年 12 月 11 日 14:27:38 | 显示全部楼层
头都看晕了 有必要全用java输出么 什么乱七八糟的
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2024 年 9 月 20 日 19:53 , Processed in 0.096382 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表