web技术编程练习题目

2018-11-28 19:33

作业1:

1.Create, test, and validate an XHTML document that describes an ordered list of your five favorite movies.

=

http://www.w3.org/1999/xhtml″>

My Favorite Movies

My Favorite Movies

    十二生肖

    哈利波特与死亡圣器 盗梦空间 阿甘正传 阿凡达

2.Create, test, and validate an XHTML document that describes a table with the following contents: The columns of the table must have the headings “Pine”, “Maple”, “Oak”, and “Fir”. The rows must have the labels “Average Height”, “Average Width”, “Typical Life Span”, and “Leaf Type”. You can make up the data cell values.

=

http://www.w3.org/1999/xhtml″>

Trees

Pine Maple Oak Fir

Average Height 20m 30m

40m 25m

Average Width 5m 6m 4.5m 4m

Typical Life Span 100y 80y 90y 110y

Leaf Type circle circle circle circle

3.Create, test, and validate an XHTML document that has a form with the following controls:?

a. A text box to collect the user’s name b. Four checkboxes, one each for the following items:

i. Four 100-watt light bulbs for $2.39 ii. Eight 100-watt light bulbs for $4.29

iii. Four 100-watt, long-life light bulbs for $3.95

iv. Eight 100-watt, long-life light bulbs for $7.49

c. A collection of three radio buttons that are labeled as follows: i. Visa ii. Master Card

iii. Discover

xmlns

=

http://www.w3.org/1999/xhtml″> 当当网

(yes|no) #REQUIRED>

2.Create an XML document with at least 4 door

2 speed automatic

radio

=

air_conditioning = \ power_windows = \ power_steering = \ \

作业2:

1.Create a DTD for a catalog of cars, where each car has the child elements make,

model, year, color, engine,

number_of_doors,

transmission_type,

and accessories. The engine element has the child elements number_of_cylinders and fuel_system (carbureted or fuel injected). The accessories element has the attributes

radio,

air_conditioning,

power_windows, power_steering, and power_brakes, each of which is required and has the possible values yes and no. Entities must be declared for the names of popular car models.

(#PCDATA)>

accessories

power_brakes three instances of the car element defined in the DTD of Exercise 1. Process this document by using the DTD of Exercise 1, and produce a display of the raw XML document.

SYSTEM

“./cars.dtd\

1997 &c; Impala Light blue

8

cylinder

multi-port fuel injected

4

door

4 speed automatic

2007 &f; Impala Light blue

8

cylinder

multi-port fuel injected

power_brakes = \

2000 &h; Impala Light pink

8

cylinder

multi-port fuel injected

4

door

4 speed automatic

3.Create an XML schema for the XML document described in Exercises 1 and 2.

xmlns:xsd=\

Schema\

xmlns=\rSchema\

targetNamespace=http://www.njupt.edu.cn/se/carSchema

elementFormDefault=\

mal\

作业3:

9.10 Write the XHTML code to create a form with the following capabilities: a. A text widget to collect the user’s name b. Four checkboxes, one each for the following items:

i. Four 100-watt light bulbs for $2.39 ii. Eight 100-watt light bulbs for $4.29 iii. Four 100-watt long-life light bulbs for

$3.95

iv. Eight 100-watt long-life light bulbs for $7.49

c. A collection of three radio buttons that are labeled as follows: i. Visa ii. MasterCard iii. Discover

html

PUBLIC

-//W3C//DTD XHTML 1.0 Strict//EN″ http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>

xmlns

=

http://www.w3.org/1999/xhtml″> 当当网

9.11 Write a PHP script that computes the total cost of the ordered light bulbs from Exercise 9.10 after

adding 6.2 percent sales tax. The program must inform the buyer of exactly what was ordered, in a table.

xmlns

=

\ confirm

if( empty($_POST[\ $bulbs1=0;

else $bulbs1=$_POST[\if( empty($_POST[\ $bulbs2=0; else

$bulbs2 = $_POST[\

if( empty($_POST[\ $bulbs3=0; else

$bulbs3 = $_POST[\if( empty($_POST[\ $bulbs4=0; else

$bulbs4 = $_POST[\$payment=$_POST[\

$cost=$bulbs1+$bulbs2+$bulbs3+$bulbs4;

printf(\cost

is

$

%4.2f

\print(\if($bulbs1) print(\

Four 100-watt light bulbs for $2.39

\if($bulbs2)

print(\100-watt light bulbs for $4.29

\if($bulbs3)

print(\100-watt, long-life light bulbs for $3.95

\if($bulbs4)

print(\100-watt, long-life light bulbs for $7.49

\print(\payment

is

$payment

\?> 实验1:

1、个人主页代码:

欢迎访问姚雪宁的主页

width=800

height=550

background=\

padding-bottom=0px padding-left=0px padding-right=0px background=\

color=#FF0 padding-top=0px align=\

个人简介

个人经历简介:

width=200

height=150

src=\姚雪宁的照片\

个人经历

    1993年,出生于?? 2000年,进入小学 2005年,

    2008年,考入当地最好的高中,太谷第一中学

    2011年,以优异的成绩考入南京邮电大学

最喜欢的四本书

达芬奇密码 哈利波特与混血王子 红岩

福尔摩斯探案全集

个人兴趣简介

个人兴趣

友情链接

课程名 开课学期 任课教师 分数

高等数学 2012秋季 张三 90

高等数学 2012秋季 张三 90

高等数学 2012秋季 张三 90

数据结构 2014秋季 张三

90

大学物理 2012春季 李四 90

离散数学 2013秋季 王五 90

javascript脚本嵌入代码:

javascript 应用

实验二:

1.图书售卖界面代码:

xmlns

=

\

Welcome to book seller

You are welcome

please input you name:

please input your address:

please input your zip:

\ size = \

please fill in the quantity field of the following form

book publisher

price

quantity

Web technology Springer press

$5.0

size = \

mathematics

ACM press

$6.2

size = \

principle of OS Science press $10

\ size = \

Theory of matrix

High education press

$7.8

Payment Method

checked = \


web技术编程练习题目.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:一年级语文上册复习课教案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: