11月10日

来源:互联网 发布:数据库框架 编辑:程序博客网 时间:2024/05/01 05:58

学习笔记 # 2016年11月10日

今日主要内容

  • 讲述了怎么在网页中插入视频和音频
  • 讲述了怎么在网页中插入表格
  • 讲述了怎么在网页中插入表单

新增标签

  • <video>插入视频,src表示路径。

    示例<video src="路径"

  • <video controls autoplay loop muted>controls表示可控,autoplay表示自动播放,loop表示循坏播放
    ,muted表示静音,source表示来源。

    示例<video controls autoplay loop muted> <source src="路径">

  • <audio>插入音频,格式如上。

  • <table>表格

    示例<table border="1">

<tr>

<td colspan="2">1-1</td>

<td>1-2</td>

<td>1-3</td>

</tr>

tr表示一行,td表示一列,colspan表示横向合并


  • <form>表单

示例<form action="#" method="get/post">
method表示提交方法,get/post表示:速度快但不安全/加密传输(二选一)

示例 <input type="text"/>

<input type="password"/>

<input type='button" value="">

<input type="submit"/>

<input type="reset"/>

<button>...</button>

text表示文本,password表示密码;button表示按钮(不会提交);value表示值(在后面输入什么按键上就显示什么);submit表示提交;reset表示重置;<button>与button相同,但可以提交。

<input type="checkbox"/>

<input type="checkbox" checked/>

checkbox表示多选,在后面加上checked表示属性(默认选中)

<input type="radio" name="sex"/>

<input type="radio" name="sex"/>

radio加name=”sex”表示单选

<select name="add" id="add">

<option value="北京">北京</option>

<option value="广东">广东</option>

</select>

select表示下拉菜单,option表示下拉选项,id表示唯一

<textarea name="" id="" cols="30" rows="10></textarea>

textarea表示多行文本框,cols表示可见宽度,rows表示可见行数

<label for="apple">苹果</label>

<input type="checkbox" id="apple"/>

label 是 input 元素定义标注(标记)(当用户选择该标签时,浏览器就会自动将焦点转到和标签相关的表单控件上)

0 0
原创粉丝点击