插入表格状数据
在XHTML中,表格使用<table>标记来定义,<tr>表示行,<td>表示列。
<table>
<tr>
<td>......</td>
</tr>
</table>
<table>核心属性
a.<border>: 指定边框宽度
b.<cellpadding>: 规定单元边沿与内容之间的空白
c.<cellspacing>: 单元格之间的空白
<tr>属性
a.<colspan> 合并列
b.<rowspan> 合并行
#网页中插入其他网页
<iframe>来标记。
基本语法为<iframe src="URL" width="" height="" scrolling=""frameborder="" name=""></iframe>
a.src 调用外部网页文件的路径
b.scrolling 选择显示滚动条。
c.frameborder 边框的宽度
XHTML表单
1.基本结构
<form action="处理程序的URL"method="get/post"></form
a.action:指定服务器端处理此表单的组件
b.get
其属性值:
a.application/x-www-form-urlencoded
b.multipart/form-data 在使用包含文件上传控件的表单时,必须使用该值。
c.text/plain
.输入控件
a.input属性:根据不同的 type 属性值,输入字段拥有很多种形式
b.type属性值:
button:按钮
checkbox:复选框
radio:单选框
password:密码框
rest:重置
submit:提交
text:文本
file:插入文件
hidden:把不用给客户显示的上传数据隐藏
image:图片提交按钮
c.创建下拉列表用select来定义
基本结构:
<select name="">
<option value ="四川">四川</option>
<option value ="北京">北京</option>
<option value="上海">上海</option>
<option value="深圳">深圳</option>
</select><br/>
##创建多行文本框
基本结构
<textarea rows="3" cols="20"></textarea>
在XHTML中,表格使用<table>标记来定义,<tr>表示行,<td>表示列。
<table>
<tr>
<td>......</td>
</tr>
</table>
<table>核心属性
a.<border>: 指定边框宽度
b.<cellpadding>: 规定单元边沿与内容之间的空白
c.<cellspacing>: 单元格之间的空白
<tr>属性
a.<colspan> 合并列
b.<rowspan> 合并行
#网页中插入其他网页
<iframe>来标记。
基本语法为<iframe src="URL" width="" height="" scrolling=""frameborder="" name=""></iframe>
a.src 调用外部网页文件的路径
b.scrolling 选择显示滚动条。
c.frameborder 边框的宽度
XHTML表单
1.基本结构
<form action="处理程序的URL"method="get/post"></form
a.action:指定服务器端处理此表单的组件
b.get
c.post
get和post的区别
a.get是将表单中的数据全添加到URL中,post是将表单中的数据发送到请求体中b.get有大小限制,一般是64K以内,post没有数据大小限制
form属性enctype
enctype:表单数据的内容类型其属性值:
a.application/x-www-form-urlencoded
b.multipart/form-data 在使用包含文件上传控件的表单时,必须使用该值。
c.text/plain
.输入控件
a.input属性:根据不同的 type 属性值,输入字段拥有很多种形式
b.type属性值:
button:按钮
checkbox:复选框
radio:单选框
password:密码框
rest:重置
submit:提交
text:文本
file:插入文件
hidden:把不用给客户显示的上传数据隐藏
image:图片提交按钮
c.创建下拉列表用select来定义
基本结构:
<select name="">
<option value ="四川">四川</option>
<option value ="北京">北京</option>
<option value="上海">上海</option>
<option value="深圳">深圳</option>
</select><br/>
##创建多行文本框
基本结构
<textarea rows="3" cols="20"></textarea>