主页
ASP Job站点的主页是当访问者访问这个站点时显示的第一页(见图29.2)。它提供这个站点的功能介绍信息,同时它也提供了到各部分的链接。
图29.2 ASP Job站点的主页
这个主页名为default.asp。当你为页面选择了这个名字,那么它将作为这个目录的缺省页。例如,你可输入http://www.aspsite.com/aspjobsite代替www.aspsite.com/aspjobsite/default.asp。
注意
你可以使用IIS管理器来确定一个目录的缺省页的文件名。
这个站点的主页是一个ASP页,这是必须的,因为在其中使用了Ad Rotator组件来显示一个变化的标题广告。否则这页只含有HTML代码了。
列表29.1 主页的内容
<HTML><HEAD><TITLE> Active Server Pages Job Site </TITLE></HEAD><BODY BGCOLOR="#FFFFFF" ALINK="#FF0000">
<!-- Create Top Table For The Title Banner --><TABLE BGCOLOR="#00AAff" WIDTH="100%"><TR><TD VALIGN=CENTER><FONT FACE=ARIAL SIZE=+4> ASP Job Site</FONT></TD></TR></TABLE>
<!-- Create Main Body Table --><TABLE HEIGHT="100%" CELLPADDING=20><TR>
<!-- The Left Cell Of The Body TableContains The Navigation Strip --><TD ALIGN=CENTER VALIGN=TOP BGCOLOR="#D0D0D0" WIDTH=100><B><P><FONT COLOR="#808080">Home</FONT><P><HR><P>Consultants<P><A HREF="/fjob/fjob1.asp">Find A Job</A><P><A HREF="/nresume/nresume1.asp">Post A Resume</A><P><A HREF="/uresume/uresume1.asp">Update Your Resume</A><P><HR><P>Employers<P><A HREF="/fconsult/fconsult1.asp">Find A Consultant</A><P><A HREF="/njob/njob1.asp">Post A Job</A><P><A HREF="/ujob/ujob1.asp">Update Job Information</A></B></TD><!-- The Right Cell Of The Body TableContains The Page Contents --><TD ALIGN=CENTER VALIGN=CENTER><!-- Create Nested Table --><TABLE HEIGHT="100%" ALIGN=CENTER CELLSPACING=50><TR><TD><FONT SIZE=+2><i>Welcome to the Active Server Pages Job Site!</I></FONT><P>If you are an Active Server Pages consultant,you have come to the right place. At this web site, you can:<UL><LI> Find a job. Search our database of job opportunities.<LI> Post a resume. Create an online resumewhich can be viewed by potential employers.<LI> Update your resume. Update your resume to reflect new skills.</UL><P>If you are an employer looking for Active Server Pagesconsultants, you can:<UL><LI> Find a consultant. Search our database of resumes.<LI> Post a job. List a job opportunity.<LI> Update job information. Update a job posting to reflectnew requirements.</UL><!-- Create Page Footer Containing Banner Advertisement --><P><CENTER><% Set MyBrow=Server.CreateObject("MSWC.ADRotator") %><%=MyBrow.GetAdvertisement("adrot.txt")%><P><FONT SIZE=-1>Copyright © 1997 </FONT><P>Questions about this site? Contact the<A HREF="MAILTO:webmaster@aspsite.com">Webmaster</A></CENTER></TD></TR>
<!-- Close The Nested Table --></TABLE></TD></TR>
这个主页,同其他ASP Job站点中的页面一样,被分成三部分,分别使用了表格,这个效果也可以通过使用框架来实现。但是,尽可能避免使用框架是有道理的(见第七章中“对框架的最后考虑”一段,“高级HTML
”)。第一部分中包含了一个为标题所建的表格,这个标题是贯穿页面顶部的长条,它用来显示Web站名和当前部分的名字。
第二部分包括一个导航条。这个导航条位于每个页面的左边部分。它包含了到所有页面的连接。当你在每个页面上都包含这个导航条时,用户只需每次按一次就可以到达其他页面。导航条是用表格来创建的。
最后,第三个表格包含了页面的主页内容,其中包含了一些有关此站点功能介绍的文字,它也嵌入了Ad Rotator组件,用来显示一个广告。