怎样在一个网页中嵌入其它网页?

chaozhou 2008-09-05 02:35:18
怎样在一个网页中嵌入其它网页?

(1)本来用一个网页框架就可以嵌入另外一个网页.但是不想用框架.
(2)本来在一个网页中加上<!--includ ...-->就能嵌入其它网页内容,但是假如我要这这个网页
中做个判断,如果变量aaa="A"就嵌入 a.html ,如果aaa="B"就嵌入 b.html, 这样又实现不了啊,
怎么办啊?谢谢了.

麻烦了,我要实现(2)功能啊,可以用程序打开一个html在写如网页能实现,但是有没简单一代码啊?
不要又一次open 和write到网页吧?
...全文
221 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
chaozhou 2008-09-14
  • 打赏
  • 举报
回复
楼上玩笑开大了............
Anlige 2008-09-05
  • 打赏
  • 举报
回复

<%
dim act : act=request.QueryString("act")
select case act
case ""
%>
<script>window.location='admin_main.asp?act=index';</script>
<%
case "index"
%>
<!--#include file="data.asp"-->
<%
case "addclass"
%>
<!--#include file="addclass.asp"-->
<%
case "addfilm"
%>
<!--#include file="addfilm.asp"-->
<%
case "adminfilm"
%>
<!--#include file="admin_film.asp"-->
<%
case "adminadmin"
%>
<!--#include file="admin_admin.asp"-->
<%
case "logout"
%>
<!--#include file="logout.asp"-->
<%
end select
%>
my145794 2008-09-05
  • 打赏
  • 举报
回复
<%@ page include= %>
zl_c 2008-09-05
  • 打赏
  • 举报
回复
用Js就可以实现.将a.html和b.html内的HTML代码放入JS的变量中,然后根据条件将变量内容输出到网页。
chaozhou 2008-09-05
  • 打赏
  • 举报
回复
都是不要框架了.
用了iframe,我的iis并发数上了很多阿 ?
haishashou 2008-09-05
  • 打赏
  • 举报
回复
建议用iframe
dandan12 2008-09-05
  • 打赏
  • 举报
回复
用IFRAME去做,百度一下
chaozhou 2008-09-05
  • 打赏
  • 举报
回复
<script src="a.html"> </script> 这个能用if 控制码?
chaozhou 2008-09-05
  • 打赏
  • 举报
回复
老大:
<% if aaa="A" then %>
<!--#include file="a.html"-->
<%else%>
<!--#include file="b.html"-->
<%end if%>

这些能用码????????, 那些应用,不是asp程序控制的啊?
jerryyan19821109 2008-09-05
  • 打赏
  • 举报
回复
用<script src="a.html"></script>这样的方式也行.不过就是麻烦点.
沙漠之狸 2008-09-05
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 jackhuclan 的回复:]
<% if(aaa="A")%>
<!--#include file="a.html"-->
<%else%>
<!--#include file="b.html"-->
<%end if%>

很久没写asp了,不知道语法对不对,思路应该是这样的
[/Quote]

错了,少了then,应该这样
<% if aaa="A" then %>
<!--#include file="a.html"-->
<%else%>
<!--#include file="b.html"-->
<%end if%>
jackhuclan 2008-09-05
  • 打赏
  • 举报
回复
<% if(aaa="A")%>
<!--#include file="a.html"-->
<%else%>
<!--#include file="b.html"-->
<%end if%>

很久没写asp了,不知道语法对不对,思路应该是这样的
jackhuclan 2008-09-05
  • 打赏
  • 举报
回复
在第一网页里面嵌入
<iframe src="page2.htm" frameborder="0"....></iframe>
shenghero 2008-09-05
  • 打赏
  • 举报
回复
说的明白点好啦,听不懂,还想多学学呢。
mrshelly 2008-09-05
  • 打赏
  • 举报
回复
同一域,可以用AJAX来做..

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧