SSD1实验报告——Lab2.2

来源:互联网 发布:mac桌面图标怎么隐藏 编辑:程序博客网 时间:2024/04/30 03:08

I. Purposes or Objectives

实验目的:旨练习是要用形式元件和 iCarnegie Servlet 工作台帮助您更好的完成工作。

II. Introduction

实验内容:

假如您是一个程序员,老板要您从下面的规格建立一个HTML页面。当您完成后,页面会专题的形式允许用户提交一个名称和密码,之后他们与欢迎的问候语。创建一个文件包含一个名为WelcomeWithPassword.html FORM元素与信息将提交到servletWelcome.class(可用以下)。

WelcomeWithPassword的表单元素必须包含以下内容:

一个单行文本输入控件命名为“Name”

一个单行文本输入控件命名为“Password”

一个提交按钮标记为“Done”

III. Materials and Equipment

实验条件与配置要求

HTML语言基础:掌握必要的HTML标签,了解相应的标签在浏览器里如何显示。

硬件配置:战神G8-SL7S2

软件配置:win10操作系统,Adobe Dreamweaver CC 2015

 

IV. Analysis and Design

实验分析和实验设计

示例解决方案


示例响应

V. Procedures

实验过程

按实验内容分步操作

完成ShippingLabelForm.html

并创建样式表进行页面美化

在Workbench中测试响应结果

(使用Workbench前需要预装java运行环境,Workbench的Java版本为jdk-6u2-windows-i586-p.exe,并正确配置环境变量,检测Java是否正确配置的方法:“运行”-键入“cmd”-键入“javac”-若有响应即安装完整)

VI.         Results

实验结果


VII. Conclusions

实验总结

通过学习HTML相关知识掌握了一下知识:

 <form>action,method;<label><input>type,name,placeholder,value

 并能通过css样式表控制网页内容的表达形式

使用Workbench进行本地的响应测试,确保serlet正常运行。

VIII. Appendix

实验附录

<!doctype html><html><head><meta charset="utf-8"><title>ShippingLabelForm</title><style>       #others{              text-align:center;              margin:auto;              margin-top:50px;       }</style></head> <body style="background-color:#78CAFF">   <div>   <h1>Exercise 3:Shipping Label</h1>   <form action="/servlet/Label" method="post">   <h3>Sender:</h3>       <label>Sender Name:<input type="text"name="SenderName"placeholder="Tom"></label><br>       <label>Sender Street Address:<input type="text"name="SenderStrtAddr"placeholder="China"></label><br>       <label>Sender City/Zip:<input type="text"name="SenderCityZip" placeholder="PostCity"></label><br>       <hr><h3>Receiver:</h3>       <label>Receiver Name:<input type="text"name="ReceiverName"placeholder="Helan"></label><br>       <label>Receiver Street Address:<input type="text"name="ReceiverStrtAddr"placeholder="USA"></label><br>       <label>Receiver City/Zip:<input type="text"name="ReceiverCityZip"placeholder="ReceiverCity"></label><br>       <hr><h3>Shipping Categoty:</h3>       <label><input type="radio"name="destination" value="domestic-stamp.jpg"checked>Domestic</label><br>       <label><input type="radio"name="destination"value="international-stamp.jpg">International</label><br>       <input type="submit" value="Done">   </form>   </div>   <div id="others">           <a href="WelcomeWithPassword.html">Welcome</a>           <a href="ShippingLabelForm.html">Shipping</a>           <a href="Teacherlogin.html">Welcome</a>   </div></body></html>


0 0