请我使用此代码在我的 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
%>