上海戏剧学院招生要求:asp中调用另一个asp网页后,如何定位呢?

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 00:48:53
asp中调用另一个asp网页后,如何定位呢?我先做了一个导航栏,并把它保存为top.asp,然后我在首页index.asp中想调用刚刚的top.asp文件,我知道是用<!--#include file="top.asp"-->调用,但是另外再想调用其他如left.asp 的文件,如何把top.asp /left.asp 文件的内容放到我想放的地方呢?希望网友能热心的帮助一下.谢谢!^_^

你要用left一定就有right ,给你举两个例子:
方法一:用表格放入,
<table width="100%" border="0">
<tr>
<td colspan="3" valign="middle"><!--#include file="top.asp"--></td>
</tr>
<tr>
<td colspan="3" align="left" valign="top">
"><!--#include file="left.asp"--></td>
<td colspan="3" align="left" valign="top">
"><!--#include file="right.asp"--></td>
</tr>
</table>

方法二:用框架,src就是要放入的文件名.注意,用框架时,网页中不能有<body></body>一定记得把它干掉
<frameset rows="30%,40%,30%" border=0 scrolling=yes>
<frame noresize="noresize" src="top.asp" scrolling=no marginheight=0 name="guide">
<frameset cols="20%,80%">
<frame noresize="noresize" src="left.asp" scrolling=no marginheight=0 marginwidth=25 name="leftMain">
<frame noresize="noresize" src="right.asp" scrolling=no marginheight=0 name="main">
</frameset>
</frameset>

把你要调用的文件当作一个文字来看代就行了,

直接复制这段代码,放到你希望的地方即可.
一般定位可以用表格,也就是将调用网的代码放入表格中,如:<td>这里放入调用代码</td>.

网页用框架有很多不好的地方!

你可以将网页的整个页面中插入一个隐藏的表格,将表格分为你想要的布局,
然后将光标定位到表格中,再切换为代码形式,再插入"><!--#include file="文件名"-->