原来是这样。谢谢
问题是我不知道怎样修改以下代码,插入网页实现换行:
<%
function xhhtml(content)
{
xhhtml=content
if (content=""
{
xhhtml=replace(xhhtml,chr(13),"<br>"
xhHtml=replace(xhHtml,chr(34),"""
xhHtml=replace(xhHtml,chr(32)," "
}
}
%>
要插入的网页
<%@LANGUAGE="javascript" CODEPAGE="936"%>
<!--#include file="Connections/conn.asp" -->
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset"
;
Recordset1.ActiveConnection = MM_conn_STRING;
Recordset1.Source = "SELECT * FROM gb ORDER BY ID DESC";
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
var Recordset1_numRows = 0;
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="file:///E|/qiuzhi/database/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#669900" class="thin">
<tr>
<td colspan="2"><div align="center">查看留言</div></td>
</tr>
<% while ((Repeat1__numRows-- != 0) && (!Recordset1.EOF)) { %>
<tr>
<td width="24%"> </td>
<td width="76%"><%=(Recordset1.Fields.Item("name"
.value)%></td>
</tr>
<tr>
<td> </td>
<td><%=(Recordset1.Fields.Item("shijian"
.value)%></td>
</tr>
<tr>
<td height="21"> </td>
<td><%=(Recordset1.Fields.Item("title"
.value)%></td>
</tr>
<tr>
<td> </td>
<td><%= Server.HTMLEncode((Recordset1.Fields.Item("content"
.value)) %></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td> </td>
</tr>
<%
Repeat1__index++;
Recordset1.MoveNext();
}
%>
</table>
</body>
</html>
<%
Recordset1.Close();
%>
在javascript的asp页面中显示
错误类型:
Microsoft JScript 编译错误 (0x800A03F0)
缺少 {'
/qiuzhi/view.asp, line5
xhhtml=content