请问我这哪错了?

yh235 2007-05-14 04:47:34
我想在html里用JS调用ASP里的内容
但是调用不出来啊
帮忙看看哪错了

123.htm

<script language="javascript" src="http://127.0.0.1/jc/ceshi.asp"></script>
==================
ceshi.asp

<!--#include file="inc/conn.asp"-->
<%
set rs = server.createobject("adodb.recordset")
sql = "select * from news "

rs.open sql,conn,1,1
if not rs.eof then
title=rs("title")
riqi=rs("riqi")
end if
rs.close
response.Write"document.write("title"");"
%>
...全文
256 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
mrshelly 2007-05-16
  • 打赏
  • 举报
回复
倒分证贴2
benaheng 2007-05-16
  • 打赏
  • 举报
回复
你用查看源代码的方式 把IE解析的原代码贴到一个JS文件里
看看哪段代码出错了(颜色不对)
cyy100 2007-05-14
  • 打赏
  • 举报
回复
<script language="javascript" src="http://127.0.0.1/jc/ceshi.asp"></script>
是调用js的
yh235 2007-05-14
  • 打赏
  • 举报
回复
ceshi.asp
显示非常正确
Freely2006 2007-05-14
  • 打赏
  • 举报
回复
你可以先试着运行http://127.0.0.1/jc/ceshi.asp看输出是否正确!
yh235 2007-05-14
  • 打赏
  • 举报
回复
ASP程序是没问题啊
但是123.htm里就是显示不出来 啊!~~头疼
难道是个<script language="javascript" src="http://127.0.0.1/jc/ceshi.asp"></script>
错了??
郁闷死了!
duwa789 2007-05-14
  • 打赏
  • 举报
回复
ps: 我那句错了~~
response.Write"document.write("& title & ");" '作为变量...
---->response.Write"document.write('"& title & "');" '作为变量...
duwa789 2007-05-14
  • 打赏
  • 举报
回复
js调用asp?

啥意思...没看懂~~~

xmlhttp不知道是不是你要的~
yh235 2007-05-14
  • 打赏
  • 举报
回复
疯了!还是不行
不知道哪错了
谁能给我个在html中JS调用ASP的例子?
我200分给他!!!
chouchy 2007-05-14
  • 打赏
  • 举报
回复
response.Write"document.write("title"");"-》
response.Write title

或者
response.Write"document.write('"&title&"');"
wasuka 2007-05-14
  • 打赏
  • 举报
回复
response.Write"document.write(\"title\");"
duwa789 2007-05-14
  • 打赏
  • 举报
回复
response.Write"document.write(""title"");"

如果这里的title是作为"title"输出的话..

response.Write"document.write("& title & ");" '作为变量...

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧