Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实验一:Web基础 #2

Open
zengsn opened this issue Sep 11, 2016 · 0 comments
Open

实验一:Web基础 #2

zengsn opened this issue Sep 11, 2016 · 0 comments
Labels

Comments

@zengsn
Copy link
Contributor

zengsn commented Sep 11, 2016

一、实验目的

练习并掌握简单HTML网页制作方法。

二、实验设备与环境

操作系统:Windows;开发平台:GitHub;开发工具:Sublime Text。

三、实验内容及步骤

  1. 安装和配置Git代码开发环境
    要求:成功安装Git工具;Fork实验库,将自己帐号下的实验库克隆到本地;结果截图到实验报告。
    提示:git clone https://github.com/{你的账号}/java-web.git
  2. 编写一个表单网页
    要求:
    (1)基于 http://www.bootcss.com/ 上的前端CSS库;
    (2)根据自选题目编写一个带表单的网页;
    (3)通过JavaScript或jQuery实现表单提交;
    (4)表单处理结果保存在一个JSON文件中;
    (5)提交成功之后JS弹窗显示JSON文件的内容(提示信息);
    (6)所有文件保存在个人目录下:labs/学号/,见:https://github.com/hzuapps/java-web。
    提示:
    (1)建议选择 http://v3.bootcss.com/ 库;
    (2)创建网页文件:labs/{你的学号}/index.html;
    (3)使用 <link>标签引用 Bootstrap 的CSS文件,或者使用CDN,参考:http://v3.bootcss.com/getting-started/
    (4)编写表单,参考:http://v3.bootcss.com/css/#forms;
    (5)创建JSON文件:labs/{你的学号}/success.json;
    (6)创建JavaScript文件:labs/{你的学号}/index.js;
    (7)使用jQuery提交代码,并显示JSON中的信息。
  3. 将代码提交到自己Fork的实验库
  4. 将实验结果填写到实验报告中
    要求:实验报告上传到 http://zeng.shaoning.net/javaweb/uploads/

代码及命令提示

  • 提交代码到GitHub
$ git pull
$ git add labs/{你的学号}/*
$ git commit -m "#2 提交实验代码"
$ git push
  • 编写表单代码
<form role="form">
  <div class="form-group">
    <label for="exampleInputEmail1">Email address</label>
    <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
  </div>
  <div class="form-group">
    <label for="exampleInputPassword1">Password</label>
    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
  </div>
  <div class="form-group">
    <label for="exampleInputFile">File input</label>
    <input type="file" id="exampleInputFile">
    <p class="help-block">Example block-level help text here.</p>
  </div>
  <div class="checkbox">
    <label>
      <input type="checkbox"> Check me out
    </label>
  </div>
  <button type="submit" class="btn btn-default">Submit</button>
</form>
$( "#target" ).submit(function( event ) {
  alert( "Handler for .submit() called." );
  event.preventDefault();
});
$.ajax({
  url: "success.json
}).done(function(data) {
  if ( console && console.log ) {
      console.dir(data);
      alert(data.msg);
    }
});
  • JSON文件内容
{
  "msg": "保存成功!"
}
@zengsn zengsn added 实验 and removed 实验 labels Sep 28, 2016
IBAS0742 pushed a commit to IBAS0742/java-web that referenced this issue Sep 29, 2016
wuchubin added a commit to wuchubin/java-web that referenced this issue Sep 29, 2016
IBAS0742 pushed a commit to IBAS0742/java-web that referenced this issue Sep 29, 2016
Mr-bingo added a commit to Mr-bingo/java-web that referenced this issue Sep 29, 2016
zengsn added a commit that referenced this issue Oct 2, 2016
Mr-bingo added a commit to Mr-bingo/java-web that referenced this issue Oct 2, 2016
gyy1238 pushed a commit to gyy1238/java-web that referenced this issue Oct 2, 2016
swindyDeer referenced this issue in swindyDeer/java-web Oct 6, 2016
Danivy added a commit to Danivy/java-web that referenced this issue Oct 6, 2016
YanghaoZYH referenced this issue in YanghaoZYH/java-web Oct 7, 2016
nihaomahenhaoba added a commit to nihaomahenhaoba/java-web that referenced this issue Oct 7, 2016
nihaomahenhaoba added a commit to nihaomahenhaoba/java-web that referenced this issue Oct 7, 2016
nibabadebaba pushed a commit to nibabadebaba/java-web that referenced this issue Oct 7, 2016
HCJ0HCJ added a commit to HCJ0HCJ/java-web that referenced this issue Oct 7, 2016
heymanheymanheyman added a commit to heymanheymanheyman/java-web that referenced this issue Oct 7, 2016
hahamg added a commit to hahamg/java-web that referenced this issue Oct 7, 2016
hahamg added a commit to hahamg/java-web that referenced this issue Oct 7, 2016
Zhengzh00 pushed a commit to Zhengzh00/java-web that referenced this issue Oct 7, 2016
This was referenced Oct 7, 2016
zengsn added a commit that referenced this issue Oct 7, 2016
zengsn added a commit that referenced this issue Oct 7, 2016
zengsn added a commit that referenced this issue Oct 7, 2016
Zjwjerry added a commit to Zjwjerry/java-web that referenced this issue Oct 7, 2016
IBAS0742 pushed a commit to IBAS0742/java-web that referenced this issue Oct 7, 2016
bestwayr referenced this issue in bestwayr/java-web Oct 7, 2016
zengsn added a commit that referenced this issue Oct 18, 2016
Yveemi added a commit to Yveemi/java-web that referenced this issue Oct 19, 2016
kangwen123 added a commit to kangwen123/java-web that referenced this issue Oct 20, 2016
zengsn added a commit that referenced this issue Oct 23, 2016
zengsn pushed a commit that referenced this issue Oct 23, 2016
zengsn added a commit that referenced this issue Oct 23, 2016
zengsn added a commit that referenced this issue Oct 24, 2016
zengsn pushed a commit that referenced this issue Oct 24, 2016
zengsn pushed a commit that referenced this issue Oct 24, 2016
zengsn added a commit that referenced this issue Oct 24, 2016
hy346143551 added a commit to hy346143551/java-web that referenced this issue Oct 24, 2016
chenshun2016 added a commit to chenshun2016/java-web that referenced this issue Oct 27, 2016
zengsn added a commit that referenced this issue Oct 28, 2016
zengsn added a commit that referenced this issue Oct 28, 2016
zengsn added a commit that referenced this issue Oct 28, 2016
zengsn pushed a commit that referenced this issue Oct 31, 2016
zengsn pushed a commit that referenced this issue Oct 31, 2016
zengsn pushed a commit that referenced this issue Oct 31, 2016
2016/10/20合并实验三的要求
smallice pushed a commit to smallice/java-web that referenced this issue Nov 4, 2016
zengsn added a commit that referenced this issue Nov 5, 2016
zengsn pushed a commit that referenced this issue Nov 5, 2016
zengsn added a commit that referenced this issue Nov 5, 2016
Merge pull request #2 from hzuapps/master
zengsn pushed a commit that referenced this issue Nov 5, 2016
zengsn added a commit that referenced this issue Nov 5, 2016
zengsn added a commit that referenced this issue Nov 7, 2016
Zjwjerry added a commit to Zjwjerry/java-web that referenced this issue Nov 7, 2016
Zjwjerry added a commit to Zjwjerry/java-web that referenced this issue Nov 7, 2016
zengsn pushed a commit that referenced this issue Nov 10, 2016
zengsn pushed a commit that referenced this issue Nov 10, 2016
wzw773828204 added a commit to wzw773828204/java-web that referenced this issue Nov 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant