最近,我在dreamweaver的后台文件中引用了其他文件,无论引用文件放在head或body之间,前台的内容都不见了。当然,不引用就可以看到前台内容。但是,运行时又可以看到。请问,那位知道如何解决这个问题。先谢过了。
解决方案 »
- 博客最近访客怎么实现
- ****************按钮失效 如何解决
- TextBox不能有类型为DataBoundLiteralControl的子级
- asp.net连接oracle数据库的一个诡异的问题
- 正则表达式,去掉除<P>和<br>以外的任何字符,怎么写啊,想不出来了
- 关于监控
- 我想down 微软的技术讲义,没有“卡号”和“姓名”,谁有?
- Microsoft Jet 数据库引擎打不开文件--这个怎么办那???急死人啦!
- radiobuttonlist数据绑定
- 请问:Excel转换为html时,如何只将选定区域的内容转换过去?
- 请问怎么用Session实现购物车的功能
- 论坛主题列表里的新贴数目提示问题
我 遇见过外部调用JavaScript时出现这种问题,我把<head><script src="" language="javascript" /></head>修改 成<head><script src="" language="javascript" ></script></head>就没有问题了!
不过,我自己也找到解决的办法,就是把include file去掉,再修改前台文件,修改好了再把include file 加上,这样也可以.不过,就是太麻烦了.代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% option explicit %>
<!-- #include file="config/db.asp" -->
<!-- #include file="config/function.inc.asp" -->
<!-- #include file="config/fy.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>本站公告</title>
<style type="text/css">
<!--
body {
font-size: 16px;
}
-->
</style>
</head><body>
<%
dim id
if request.QueryString("id")="" then
id=1
else
id=cint(request.QueryString("id"))
end if
%>
<%
'显示数据
on error resume next
dim rst1,sql1,show
sql1="select a_title,a_content from tbl_affiche where a_id="&id
set rst1=server.CreateObject("adodb.recordset")
rst1.open sql1,conn,1,1
if rst1.eof and rst1.bof then
msgboxU "参数错误!"
else
show="true"
end if
%><p><a href="index.asp" target="_blank">首页</a>-本站公告</p>
<table width="739" height="140" border="1" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="146" height="32"><div align="center">公告标题</div></td>
<td width="589">
<% if show="true" then %><%=rst1("a_title")%><% end if %>
</td>
</tr>
<tr>
<td height="32"><div align="center">公告内容</div></td>
<td><% if show="true" then %><%=rst1("a_title")%><% end if %>
</td>
</tr>
<%
rst1.close
set rst1=nothing
%>
<%
'显示表格中的数据
on error resume next
dim rst,sql,pagelistnum,link,page
pagelistnum=3
link="showaffiche.asp?id="&id&""
if request.QueryString("page")="" then
page=1
else
page=cint(request.QueryString("page"))
end if
sql="select top "&(page*pagelistnum)&" * from tbl_affiche"
set rst=server.CreateObject("adodb.recordset")
rst.open sql,conn,1,1
rst.PageSize=pagelistnum
rst.AbsolutePage=page
if rst.eof and rst.bof then
msgboxU "错误参数!"
else
do while not rst.eof
%>
<tr>
<td height="37" colspan="2"><div align="left"><% response.Write "<a href='showaffiche.asp?id="&rst("a_id")&"&page="&page&"' target='_self'>"&rst("a_id")&":"&cutstr(rst("a_title"),15,"...")&"</a>" %></div></td>
</tr>
<%
rst.movenext
loop
end if
rst.close
set rst=nothing
sql="select count(*) as recnum from tbl_affiche"
%>
<tr>
<td height="35" colspan="2"><div align="center">
<%
fy sql,page,pagelistnum,link
%>
</div></td>
</tr>
</table>
<p> </p>
<%
conn.close
set conn=nothing
%>
</body>
</html>