您的位置:首页 > Web前端 > HTML

HTML图片热点、网页划区、拼接、表单

2015-12-14 10:53 639 查看
一.图片热点:

规划出图片上的一个区域,可以做出超链接,直接点击图片区域就可以完成跳转的效果。

示例:



二.网页划区:

在一个网页里,规划出一个区域用来展示另一个网页的内容。

示例:



三.网页的拼接:

在一个网络页面内,规划出多个页面窗口,以表格拼接的形式展示出来。

示例:



四.表单:

<form id="" name="" method="post/get" action="负责处理的服务端">

id不可重复,name可重复,get提交有长度限制,并且编码后的内容在地址栏可见,

post提交没有长度限制,且编码后内容不可见。

</form>

1.文本输入

  文本框<input type="txt" name="" id="" value="" />

  密码框<input type="password" name="" id="" value="" />

  文本域<textarea name="" id="" cols=""(字符多少) rows=""(几行高)></textarea>

  隐藏域<input type="hidden" name="" id="" value="" />

2.按钮

  提交按钮<input type="submit" name="" id="" disabled="disabled" value="" />点击后转到form内的提交服务器的地址

  重置按钮<input type="reset" name="" id="" disabled="disabled" value="" />

  普通按钮<input type="button" name="" id="" disabled="disabled" value="" />

  图片按钮<input type="image" name="" id="" disabled="disabled" src="图片地址" />

  disabled使按钮失效

  enable使按钮可用

3.选择输入

  单选按钮组<input type="redio" name="" checked="checked" value="" />

  name的值用来分组,value的值看不见,提交给程序用的,checked设置默认选项。

  复选框组<input type="checkbox" name="" checked="checked" value="" />

  文件上传<input type="file" name="" id="" />

  <lable for=""></lable>

  lable标签为input元素定义标注。

  lable元素不会向用户呈现任何特殊效果,不过,他为鼠标用户改进了可用性。如果您在lable元素内点击文本,就会触发此控件。

  就是说,当用户选择该标签时,浏览器会 将焦点转到和标签相关的表单控件上。

  lable标签的for属性应当与相关元素的id属性相同。

4.下拉列表框

  <select name="" id="" size="" multiple="multiple">

  --size为1时,为菜单;>1时,为列表。multiple为多选。

    <option value="值">内容1</option>

    <option value="值" selected="selected">内容2</option>

    --selected,设为默认

    <option value="值">内容3</option>

  </select>

5.标签

<label></label>

字段集 (一堆label)

<fieldset></fieldset>

6.表单当中语句的使用示例:



以上语句呈现出的效果为:



表单练习题:

<body background="2.jpg">

<table width="500" height="500" border="0" align="center">
<tr>
<td width="100" height="20">邮箱:</td>
<td width="100"><form id="form1" name="form1" method="post" action="">
<p><input type="text" name="first" id="" value=""/></p>
</form></td>
</tr>

<tr>
<td height="20"> </td>
<td><form id="form2" name="form2" method="post" action="">
<font color="#CCCCCC" size="-1">需要通过邮箱激活账户,不支持sohu,21cn,sogou的邮箱
</font></form></td>
</tr>

<tr>
<td width="100" height="20">登录用户名:</td>
<td width="100"><form id="form3" name="form3" method="post" action="">
<p>
<input type="text" name="first" id="" value=""/>
</p>
</form></td>
</tr>

<tr>
<td height="20"> </td>
<td><form id="form4" name="form4" method="post" action="">
<font color="#CCCCCC" size="-1">仅在登录时使用,字符数不少于4个
</font></form></td>
</tr>

<tr>
<td width="100" height="20">显示名称:</td>
<td width="100"><form id="form5" name="form5" method="post" action="">
<p>
<input type="text" name="first" id="" value=""/>
</p>
</form></td>
</tr>

<tr>
<td height="20"> </td>
<td><form id="form6" name="form6" method="post" action="">
<font color="#CCCCCC" size="-1">即昵称,字符数不少于2个
</font></form></td>
</tr>

<tr>
<td width="100" height="20">密码:</td>
<td width="100"><form id="form7" name="form7" method="post" action="">
<p>
<input type="password" name="first" id="" value=""/>
</p>
</form></td>
</tr>

<tr>
<td width="100" height="20">确认密码:</td>
<td width="100"><form id="form8" name="form8" method="post" action="">
<p>
<input type="password" name="first" id="" value=""/>
</p>
</form></td>
</tr>

<tr>
<td height="20"> </td>
<td><form id="form9" name="form9" method="post" action="">
<font color="#CCCCCC" size="-1">至少8位,必须包含字母、数字、特殊字符
</font></form></td>
</tr>

<tr>
<td width="100" height="60">性别:</td>
<td width="100"><form id="form10" name="form10" method="post" action="">
<select name="down" size="1">
<option values="">男</option>
<option values="">女</option>
</select></form></td>
</tr>

<tr>
<td width="100" height="30">喜好:</td>
<td width="100"><form id="form11" name="form11" method="post" action="">
<select name="down" size="1">
<option values="">听音乐</option>
<option values="">唱歌</option>
<option values="">打篮球</option>
<option values="">看书</option>
</select></form></td>
</tr>

<tr>
<td height="100"> </td>
<td><form id="form12" name="form12" method="post" action="">
<input type="submit" name="button" id="button" value="注册"/>
<input type="reset" name="button" id="button" value="重置"/>
</form></td>
</tr>
</table>
</body>



7.快速制作网页的方法:

  利用Photoshop中的切片工具来规划出要设置链接的位置,设置好后存储为web可使用的html格式。

用DREAMWEAVER打开,打开设计页面,选择切片弄好的位置,在属性中输入超链接的网址即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: