HTML 2017.07.19

1. div回顾:

<div id="...." style="backgroud-color:....; width:..px;height:....px; float:left/right;text-align:....">   text  </div>


2. 设置网页的背景图片;

<head>
<style type="text/css">
body{ background-img:url (图片的url);  }
</style>
</head>


3.  html的输入与表单

HTML 表单格式:

<form>

<!--input--!>

<form>



1) 创建文本字段输入框与创建密码字段输入框

<form>
	   	Username:<input type="text" name="usrname"> <br> <br>
	   	Password:<input type="password" name="password">
 </form>




2) <form action="url">   绝对url与相对url

action表示把表单的数据向action中的地址传送,无特殊说明则为本页。


3)单选按钮radio buttons(内联元素);

基本格式:

<form>
	
	<input type="radio" name="subject" value="math" >math  <br/>
	<input type="radio" name="subject" value="physics" >psysics  <br/>
	<input type="radio" name="subject" value="chinese"> chinese  <br/>
	
</form>

注:同一个内容的选择name中的内容要相同,否则就失去了单选的效果


4)复选按钮checkboxes

格式:

<form>
	<input type="checkbox" name="vehicle" value="bus" style="width:40px;height:40px">bus   <br/>
	<input type="checkbox" name="vehicle" value="boat" style="width:40px;height:40px" >boat   <br/>
	<input  type="checkbox" name="vehicle" value="plane"  style="width:40px;height:40px">plane <br>
	
</form>




5)submit提交按钮

基本格式:

<form action="table1.html" method="get">
Username: <input type="text" style="width:400px;height:60px">
	<input type="submit"  name="submit" style=" width:70px;height:60px">
	
</form>



6)可选择内容的按钮

基本格式:

<form >
	<select name="options">
		<option value="one" ><h >one</h></option>        <br/>
		<option value="two">two </option>     <br/>
		<option valye="three">three</option>    <br/>
		<option value="four">four</option>      <br/>
	</select>
</form>





  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值