网站设计中的标题页、主页面、尾页的镶嵌方法
hanhaiyiou提交于:2007-8-13 | 本文目前专长值:网站设计中的标题页、主页面、尾页的镶嵌方法
作者:夏日冰洲 2007-06-01 09:29:52
| 标签: | ||||
在网站设计中经常遇到标题,页尾保持不变,而主页面不断变化的情况。一般的解决方法有:每页分别做(工作量大,且效果不好),使用框架(使用较多,但涉及浏览器支持问题),下面介绍一种解决方法:
1 建立标题页面,存储为txt格式。如tou.txt,例子代码如下:
<table woth="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table woth="760" height="83" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><img src="image/banner1.gif" woth="757" height="81" /></td>
</tr>
<tr>
<td height="2"><img src="image/t2.gif" woth="750" height="2" /></td>
</tr>
<tr>
<td>
<table woth="760" height="83" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><img src="image/banner1.gif" woth="757" height="81" /></td>
</tr>
<tr>
<td height="2"><img src="image/t2.gif" woth="750" height="2" /></td>
</tr>
</table>
2 建立尾页,存储为txt格式,如wei.txt。例子代码如下:
<!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>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
-->
</style>
</head>
<body>
<table woth="750" border="0" align="center" cellspacing="0">
<tr>
<td woth="697" height="10"><img src="image/t2.gif" woth="750" height="4" /></td>
</tr>
<tr>
<td height="24" background="image/wei1.gif"><div align="center" class="STYLE1">大兴区农委?2007; 技术支持:北京市农林科学院农业综合发展研究所</div></td>
</tr>
</table>
</body>
</html>
3 .net中建立shiyan.aspx,使用一下代码,实现三者的集成/
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="pingjia1.aspx.vb" Inherits="pingjia1" %>
<!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 o="Head1" runat="server">
<title>适宜性评价参数选择</title>
</head>
<body leftmargin="0" topmargin="0">
<center>
<!--#include file="tou.txt" -->
<table valign="top" woth="755" border="0" align="center" >
<tr>
<td woth="1" height="231" ><img src="image/pic_right[1].gif" woth="1" height="450" /></td>
<td valign="top" style="background-image: url(image/bj[1].gif)">
<!--#include file="要显示的主页" -->
</td>
<td woth="10"><div align="right"><img src="image/pic_right[1].gif" woth="1" height="450" /></div></td>
</tr>
</body>
<!--#include file="wei.txt" -->
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
-->
</style>
</head>
<body>
<table woth="750" border="0" align="center" cellspacing="0">
<tr>
<td woth="697" height="10"><img src="image/t2.gif" woth="750" height="4" /></td>
</tr>
<tr>
<td height="24" background="image/wei1.gif"><div align="center" class="STYLE1">大兴区农委?2007; 技术支持:北京市农林科学院农业综合发展研究所</div></td>
</tr>
</table>
</body>
</html>
3 .net中建立shiyan.aspx,使用一下代码,实现三者的集成/
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="pingjia1.aspx.vb" Inherits="pingjia1" %>
<!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 o="Head1" runat="server">
<title>适宜性评价参数选择</title>
</head>
<body leftmargin="0" topmargin="0">
<center>
<!--#include file="tou.txt" -->
<table valign="top" woth="755" border="0" align="center" >
<tr>
<td woth="1" height="231" ><img src="image/pic_right[1].gif" woth="1" height="450" /></td>
<td valign="top" style="background-image: url(image/bj[1].gif)">
<!--#include file="要显示的主页" -->
</td>
<td woth="10"><div align="right"><img src="image/pic_right[1].gif" woth="1" height="450" /></div></td>
</tr>
</body>
<!--#include file="wei.txt" -->
</html>
你对本文的评价:
本文目前专长值:
| 本文发布者:hanhaiyiou (在本营发布了条专长内容) 专业值: | 汗水: [联系我] [加我为好友] |
hanhaiyiou在本栏的其他内容查看全部相关评论(0条)
! 本网信息均由网友提供,并不代表蚁集观点.
热门帖子


