+ -
当前位置:首页 → 问答吧 → asp怎样动态加载某个页面?

asp怎样动态加载某个页面?

时间:2011-08-09

来源:互联网

就是说要在页面的固定部位include某个由参数传过来的页面名字,当然include是无法实现的,搜了很多csdn上类似的帖子好像也没有很好的解答,继续求
<!--#include file="name???.asp"-->

作者: jiantizi88   发布时间: 2011-08-09

文件A.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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>
</head>
<%dim abc
abc=100%>

<body>
<!--#include file="b.asp"-->
</body>
</html>


文件B.asp
<%=abc%>

浏览文件A.asp你就都知道了

作者: lmkyo   发布时间: 2011-08-09

asp可以这样

<% if 条件 then %>
<!--#include file="a.asp"-->
<% else %>
<!--#include file="b.asp"-->
<% end if %>

你试一下行不行。
有问题请到我的博客留言,我会及时回复的。

作者: jquerywww   发布时间: 2011-08-09