控制DIV的显示

来源:百度知道 编辑:UC知道 时间:2024/05/17 04:41:56
有三个页面(页面一、页面二、页面三)
这三个页面都包含了同一个页面,然后这个页面里面有三个DIV(DIV1 DIV2 DIV3)
我想的是在页面一的时候显示DIV1 页面二的时候显示DIV2 ……
这样怎么实现呀?

急呀,我把我所有分都拿出来了~

你这样试试,在包含三个DIV的页面里先判断调用自己页面的文件名,然后根据不同的文件名显示不同的div:
比如你三个页面是1.asp,2.asp,3.asp那么在包含DIV的页面里
<%
Dim fileName,postion
fileName = Request.ServerVariables("script_name")
postion = InstrRev(fileName,"/")+1
fileName = Mid(fileName,postion)
select case fileName
case "1.asp":
<div id="1"></div>
case "2.asp":
<div id="2"></div>
case "3.asp":
<div id="3"></div>
end select
%>
随手写的,没有测试,应该是没问题的,以前做过

IF ELSE判断呵呵或者SWITCH 判断
不是很明白你说的什么