- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材
第六章 电子商务网站创建实例
学习目标
熟悉ASP与数据库链接与操作
熟练代码的模块化设计及重用
能根据实际情况建立电子商务网站用户管理功能等的设计与实现
熟悉网站的发布流程
6.1建设一个简单的网上商店
下面给出首页(index.asp)的源代码:
1
2
3
4
5
6
7
8
9
10
11
12
13 !--#include file=inc/conn.asp--
htmlheadtitle随缘网上商店——首页/title
meta http-equiv=Content-Type content=text/html; charset=gb2312
link href=images/css.css rel=stylesheet type=text/css
/head
body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
!--#include file=webtop.asp--
!--#include file=guide.asp--
!--#include file=rank.asp--
!--#include file=shops.asp--
!--#include file=webbuttom.asp--
/body
/html
参数:FileName:指定要包含的文件名。FileName 必须包含文件名扩展,而且必须将文件名用引号 () 引起来。
第1行:调用conn.asp文件,这个文件主要负责连接数据库;
第4行:调用css.css样式表文件。因本站点就使用一个样式表文件,所以不另外建立一个文件夹存放。因为在以下的所有网页中都需要调用同样的css.css样式表文件,所以在本章书之后的页面源代码中都省略这一行,请读者们注意。
第7~11行:按照图6-2的模块化设计,调用相应文件。
所以在本章书之后的页面源代码中都省略这两行,请读者们注意。
WebTop.asp页面源代码如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 table width=760 border=0 align=center cellpadding=0 cellspacing=0
tr
td background=images/top_bg.gif
table width=760 border=0 align=center cellpadding=0 cellspacing=0
tr valign=bottom
td width=160 height=60 rowspan=2 align=center valign=middle
a href=index.aspimg src=images/logo.gif width=160 height=60 border=0
/a/td
td width=600 height=35 valign=middle align=right
a href=gouwu.asp?action=showlx=1 target=_blank
img src=images/top_cart.gif width=76 height=20 border=0/a
a href=user.aspimg src=images/top_my.gif width=76 height=20
border=0/a
a href=help.aspimg src=images/top_faq.gif width=76 height=20
border=0/a
a href=logout.aspimg src=images/top_wh.gif width=76 height=20
border=0/a
/td
/tr
tr valign=bottom
td width=600 height=35 align=right
table width=100% border=0 cellpadding=0 cellspacing=0
tr align=right
td width=50%/td
tda href=index.aspimg border=0 src=images/home.gif/a/td
tda href=jetway.aspim
原创力文档


文档评论(0)