2022年web技术实验报告_共8页_第1页
2022年web技术实验报告_共8页_第2页
2022年web技术实验报告_共8页_第3页
2022年web技术实验报告_共8页_第4页
2022年web技术实验报告_共8页_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、实 验 报 告( 2014 / 2015 学年 第 2 学期)课程名称web 技术实验名称web服务端脚本编写实验时间2015年05月13日指导单位南京邮电大学计算机学院指导教师韩京宇学生姓名陶飞班级学号b13040932学院 (系)计算机软件专业软件工程精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 1 页,共 8 页 - - - - - - - - -精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 1 页,共 8 页 - - - - - - - - -0实 验 报 告实验名称web 服务端脚本编写指导教

2、师韩京宇实验类型上机实验学时2实验时间2015-05-131、实验目的(1)通过上机实践,熟悉apache 服务器的安装和使用方法。(2)掌握 php 脚本语言,熟练运用php 语言进行服务器端编程。2、实验环境硬件:微机软件: apache,php 模块编辑器: vim 或者 gedit3、实验内容1.显示一个图书售卖界面,主要包括以下内容(1)html 标题“welcom to book seller” 。(2)页面内容第一行黑体显示“you are welcome” 。(3)标签提示 “please input your name ” ,并创建输入框。(4)标签提示 “please in

3、put your address ”,并创建输入框。(5)标签提示 “please input your zip”,并创建输入框。(6)黑体显示 “please fill in the quantity field of the following form”.(7)表格分成四列,分别是“boook”,“publisher”,“price” ,“quantity”,其中包含信息如表格所示(8)quantity 采用输入框输入。(9)显示 “payment method”精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 2 页,共 8 页 - - - -

4、 - - - - -精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 2 页,共 8 页 - - - - - - - - -1(10)用单选按钮显示三个支付方式选项“cash”,“cheque” , “credit card” 。(11)显示两个标准按钮, “submit”按钮和 “reset”按钮。2 当用户输完各个内容并按下“submit”按钮后,通过脚本生成新的界面。其中包含以下内容(1)customer name(2)customer address(3)customer zip(4)以表格形式显示订购图书信息,包括四列“book” , “pu

5、blisher” ,“price”,“total cost”,其中 total 通过脚本动态计算生成。未购买的图书不显示。(5)计算并显示 “(名字) has bought (数量) books ” 。(6)计算并显示 “(名字) paid(总额)” 。(7)根据用户的选择方式显示“paid by (支付方式 )” 。3 将用户购买信息存入到文件当中,每个客户包含三行信息,即2 中的(5) (6) (7)三句话。4 如果用户按的是 “重置按钮 ” ,则清楚所有的输入信息。精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 3 页,共 8 页 - - -

6、- - - - - -精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 3 页,共 8 页 - - - - - - - - -2四丶实验过程welcome to book selleryou are wlcomeplease input your nameplease input your addressplease input your zipplease fill in the quantity field of the following formbookpublisherpricequantityweb technologyspringer p

7、ress$5.0mathematics精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 4 页,共 8 页 - - - - - - - - -精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 4 页,共 8 页 - - - - - - - - -3acm press$6.2principle of osscience press$10theory of matrixhigh education press$7.8payment methodcashchequecredit card精品学习资料 可选择p d f

8、 - - - - - - - - - - - - - - 第 5 页,共 8 页 - - - - - - - - -精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 5 页,共 8 页 - - - - - - - - -4real roots of a quadratic equation!-var a = prompt(what is the value of an,);var b = prompt(what is the value of bn,);var c = prompt(what is the value of cn,);var d = b

9、*b-4.0*a*c;if(d0)document.write(error input!);elsevar root_part=math.sqrt(d);var denom=2.0*a;var root1=(-b + root_part)/denom;var root2=(-b - root_part)/denom;document.write(the first root is:,root1,);document.write(the second root is:,root2,);/-process the qwe.html formcustormer:?phpprint($name$str

10、eet$city);? order informationbookpublisherpricetotal cost web tecohnologyspringer press$5.0 mathematicsacm press$6.2 principle of osscience press$10 theory of matrixhigh eduction press$7.8精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 7 页,共 8 页 - - - - - - - - -精品学习资料 可选择p d f - - - - - - - - - - - - - - 第 7 页,共 8 页 - - - - - - - - -6 ?php print($name has bought $total_items books); printf($name paid $ %5.2f,$total_price);print(paid by $payment);?五丶实验结论通过该实验,我对php脚本语言有了更近的认识,能基本熟练运用 php语言进行服务器端的编程,开始对html 中数据的

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论