请使用此代码
在我的jquery移动页面上使用ajax加载服务器端页面 <script language="javascript">
$('#try').bind('pageshow', function (){
var url = window.location.search.substring(1);
$('#try').load('real_news.asp?'+ url);
});
</script>
但问题是当我将页面加载到div中时,它不会加载但是会读出div中的代码,如下所示:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/tv.asp" -->
<%
Dim rs_read__MMColParam
rs_read__MMColParam = "1"
If (Request.QueryString("news_id") <> "") Then
rs_read__MMColParam = Request.QueryString("news_id")
End If
%>
<%
Dim rs_read
Dim rs_read_cmd
Dim rs_read_numRows
Set rs_read_cmd = Server.CreateObject ("ADODB.Command")
rs_read_cmd.ActiveConnection = MM_tv_STRING
rs_read_cmd.CommandText = "SELECT * FROM news_update WHERE news_id = ?"
rs_read_cmd.Prepared = true
rs_read_cmd.Parameters.Append rs_read_cmd.CreateParameter("param1", 5, 1, -1, rs_read__MMColParam) ' adDouble
Set rs_read = rs_read_cmd.Execute
rs_read_numRows = 0
%>
答案 0 :(得分:0)
声音不像asp页面那样被解释。你在IIS服务器上运行代码吗? 还要检查IIS上是否阻止了asp扩展。默认情况下,IIS 7.5上未安装ASP。 请查看此link以获取更多信息或如何在IIS7.5上启用ASP(经典)