客户端网页编程--第一章、第二章(部分)

第一章 Web应用程序开发原理

主机/哑终端的集中计算模式:使用者一般通过只有一个屏幕、一个键盘和一根主机连接线的“哑终端”与主机的应用程序进行交互。这种模式一般称为主机/终端模式(Mainframe/Terminal)。

客户机/服务器计算模式(Client/Server,简称C/S):

优点:信息共享性好,网络信息传输量小

缺点:不易维护,用户操作界面风格不一致,能够处理的数据类型不易扩展

浏览器/服务器计算模式(B/S):

特征:客户端只需安装普通使用的浏览器(如IE、FireFox等),而应用程序被相对集中地放在Web服务器上。

Web服务器:

最常用的包括Apache、Tomcat、Microsoft Internet Information Server(简称IIS)、IBM WebSphere、NetScape Application Server、Oracle Web Server等。

HTTP请求格式:

请求行         GET        /lovobook/index.html                 HTTP/1.1

请求头         Host:  127.0.0.1:80

                                、、、、

                                、、、、

空行

消息体             username=lovo、、、


HTTP响应格式:

状态行           HTTP/1.0        200    OK

响应头              、、、、

                         、、、、

空行

消息体         <html>

                     、、、

                   </html>

网页分类:静态网页、客户端动态网页、服务器端动态网页

静态网页;

以.html或者.htm文件保存。静态网页发布后,页面内容(文本、图像、超链接等)和外观总是保持不变。

优点:信息访问的效率很高,网络的架设与开发相当容易。

客户端动态网页:

典型的客户端动态网页技术包括JavaScript、ActiveX控件、Java Applet等。

优点:充分利用客户端的计算资源、减轻了服务器和网络上的计算压力、很方便地实现基于图形的用户交互界面。

Web应用程序工作原理:

                                    HTTP Request

   Web浏览器     ——————————————>          Web服务器

                         <__________________________                             <__HTTP网页_

                                    HTTP Response

第二章 XHTML基础(部分)

xhtml扩展名是.html或者.htm

定义正文标题

<!DOCTYPE html>
<html>
<head>
<title>day1</title>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
定义一个段落
<!DOCTYPE html>
<html>
<head>
 <title>day1</title>
</head>
<body>
<p>段落示例1</p>
<p>段落示例2</p>
<p>段落示例3</p>
</body>
</html>
定义引用文本
<!DOCTYPE html>
<html>
<head>
 <title>day1</title>
</head>
<body>
 <meta charset="UTF-8">
 <title>day1</title>
<P>独立宣言的一段</P>
<blockquote>
    When in thecourse of human events,it becomes,necessary for one
    people to dissolve the plitical bands which have connectsd them
    When in thecourse of human events,it becomes,necessary for one
    people to dissolve the plitical bands which have connectsd them
    When in thecourse of human events,it becomes,necessary for one
    people to dissolve the plitical bands which have connectsd them
</blockquote>
</body>
</html>
定义列表
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
 <title>day1</title>
</head>
<body>
<p>有序列表</p>
<ol>
    <li>编写文件</li>
</ol>
<p>无序列表</p>
<ul>
    <li>编写列表文件</li>
</ul>
<p>定义列表示例</p>
<dl>
    <dt>猫</dt>
    <dd>一个奴役自己的动物</dd>
</dl>
</body>
</html>
定义预编排文本
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
 <title>day1</title>
</head>
<body>
<pre>
       2.9
     + 1.2
    --------
       4.1
</pre>
</body>
</html>
定义区分块文本
<!DOCTYPE html>
<html>
<head>
    <style>
        .bordered {border-style: solid;}
<meta charset="UTF-8">
    <title>day1</title>
</head>
<body>
<p>这是一个常规段落</p>
<div class="bordered">
    <p>这是一个用div定义的一个段落</p>
</div>
</body>
</html>
跨越多个字符
<!DOCTYPE html>
<html>
<head>
    <style>
.emphasis {color: red;text-decoration: underline; font-weight: bold;}
    </style>
<meta charset="UTF-8">
    <title>day1</title>
</head>
<body>
<p><span class="emphasis">这段文本被重要强调</span>,而这段文本没有。 </p>
</body>
</html>


创建超链接

绝对链接:使用全路径(包含协议和服务器全地址)的链接

相对链接:不提供引用网页的全部细节,只用于链接相同网站上的其他页面


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值