我的页面地底部是版权,联系方式等信息,每个页面多有,我想只要修改一个地方,就所有的页面都修改了,怎么办? 用框架啊,或者用IFRAME嵌入页面 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把这部分公共内容单独写成一个Jsp文件,其它要显示这个页面的Jsp文件用include标记把这个文件插入当前文件,都是这么做的! 用iframe嵌入啊,不曉得jsp:include行不,你試試~~~ 做三个页 header.html toc.html footer.html 其中footer.html中填写授权信息如果代码不懂 去看html语法<html><head> <title>版权信息</title></head><frameset rows="133,*,55" cols="*"> <frame src="header.html" name="header" title="header" scrolling="no" target="body" noresize="noresize"> <frameset cols="24%, *" frameborder="1" framespacing="3"> <frame frameborder="2" marginwidth="0" marginheight="0" src="toc.html" name="frame" title="TOC"> <frame frameborder="2" src="/837.html" name="body" title="help"> </frameset> <frame src="footer.html" name="footer" title="footer" scrolling="no"> <noframes> <p><br /> </p> </noframes></frameset></html> <%@ include file="Top.htm"%>Top.htm内容如:<table width="100%" border="0" align=center cellpadding="3" cellspacing="0" class="tableBorder1" style="width:100%"> <tr> <td class="bodytitle" height=25><table height="100%" width="100%" border=0 cellpadding=0 cellspacing=0> <tr valign=middle> <td width=40><img src="images/manage/i_home.gif"> </td> </tr> </table></td> </tr> <tr> <td height=10></td> </tr></table> 谢谢,但是不知道这个include和frameset那个效率高。。 include 吧...不是所有浏览器都支持frameset的. 但是用include 有个问题所include的文件中的一些图片了什么的路径问题不好解决哪位知道也请解答一下小弟先谢了也帮楼主up!!! include 文件的路径用当前文件的路径! include路径就用相对路径那种就行了,实在不行才考虑写绝对的 用include就可以,通常首页是index.jsp,上面文件top.jsp,下面文件bottom.jsp(这两个文件可以静态HTML页),你要求的内容就可以写在bottom.jsp中,而index.jsp中用<%@ include file="bottom.jsp"%>index.jsp/top.jsp/bottom.jsp放在同一目录下,这样也不会出现绝对路径问题 如楼上的说。。那如果是静态页面呢html,该怎么办? 还是用JavaScript的一一document.write()出来吧。这样不管是Html还是jsp都可以引用了。 写一个页面bottom.jsp把版权,联系方式等信息写好 然后需要用到的地方<%@include file = "bottom.jsp"%> 就可以了 要不就用dreamweaver里的library,就是传起来麻烦点 把这部分公共内容单独写成一个Jsp文件,其它要显示这个页面的Jsp文件用include标记把这个文件插入当前文件,都是这么做的! 为什么要将图片转换成16进制数据,存放在数据库中? 关闭窗口的问题 我也来问个正则表达式问题 大家救救我吧!在JSP里实现QQ表情 兄弟们,帮帮忙,为什么struts1.1 和org.apache.commons.fileupload不能一起使用呢? 为什么<input type="file" name="textfield" value="c:\aaa.zip">默认值显示不出来 JSP分页标签问题。求解,急啊 一个关于hibernate的问题 求教:javabean action中数据传递 用Bean连接数据库连接池,不知道行不行? jsp+mysql出现乱码的问题.全是??????
如果代码不懂 去看html语法<html>
<head>
<title>版权信息</title>
</head>
<frameset rows="133,*,55" cols="*">
<frame src="header.html" name="header" title="header" scrolling="no" target="body" noresize="noresize">
<frameset cols="24%, *" frameborder="1" framespacing="3">
<frame frameborder="2" marginwidth="0" marginheight="0" src="toc.html" name="frame" title="TOC">
<frame frameborder="2" src="/837.html" name="body" title="help">
</frameset>
<frame src="footer.html" name="footer" title="footer" scrolling="no">
<noframes>
<p><br />
</p>
</noframes>
</frameset></html>
<table width="100%" border="0" align=center cellpadding="3" cellspacing="0" class="tableBorder1" style="width:100%">
<tr>
<td class="bodytitle" height=25><table height="100%" width="100%" border=0 cellpadding=0 cellspacing=0>
<tr valign=middle>
<td width=40><img src="images/manage/i_home.gif"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height=10></td>
</tr>
</table>
不是所有浏览器都支持frameset的.
所include的文件中的一些图片了什么的路径问题不好解决哪位知道也请解答一下
小弟先谢了
也帮楼主up!!!
html,该怎么办?
这样不管是Html还是jsp都可以引用了。