| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 456 人关注过本帖
标题:大家帮我看看这段,为什么放在function.asp中调用时怎么什么显示不出来
只看楼主 加入收藏
hsbwp1314
Rank: 2
来 自:湖南长沙
等 级:论坛游民
帖 子:88
专家分:25
注 册:2008-12-1
结帖率:53.85%
收藏
 问题点数:0 回复次数:1 
大家帮我看看这段,为什么放在function.asp中调用时怎么什么显示不出来
<%
function menu(menuwhere)
dim rsmenu,sqlmenu
set rsmenu=server.CreateObject("Adodb.Recordset")
sqlmenu="select * from LogTitle where disignwhere='"&menuwhere&"' order by ID"
rsmenu.open sqlmenu,LouConn,1,1
if rsmenu("content")="" or isnull(rsmenu("content")) then
response.Write "栏目正在建设中..."
else
if menuwhere="Top" or menuwhere="log" then
menu=""&rsmenu("content")&""
else
menu="<a href='ShowAllCont.asp?&id="&rsmenu("content")&"' target='_self'>"&rsmenu("content")&"</a>"
end if
end if
rsmenu.close
end function
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th scope="col"><%=menu("Mid1")%></th>
    <tr>
    <th scope="col"><%=menu("Mid2")%></th>
  </tr>
  <tr>
    <th scope="col"><%=menu("Right1")%></th>
  </tr>
  <tr>
    <th scope="col"><%=menu("left1")%></th>
  </tr>
  <tr>
    <th scope="col"><%=menu("left2")%></th>
  </tr>
  <tr>
    <th scope="col"><%=menu("left3")%></th>
  </tr>
  </tr>
</table>    上面这段代码,如果这样放在一个页面里调用,若rsmenu("content")="" 则输出:"栏目正在建设中...".若我把函数放在funtion.asp中,再用<!--#include file="function.asp"-->调用,遇到rsmenu("content")="" 为空时,却什么也不显示,请问大家这是为什么呢??
搜索更多相关主题的帖子: function content target where 
2012-03-01 15:56
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:0 
response.Write "栏目正在建设中..."
改成
menu="栏目正在建设中..."

----我怎能在别人的苦难面前转过脸去----
2012-03-01 16:59
快速回复:大家帮我看看这段,为什么放在function.asp中调用时怎么什么显示不出来
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017221 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved