web表单制作代码

2023-03-11 06:46:24 来源:网络

web表单制作代码

html做个表格代码

html做个表格的步骤如下:

1、首先新建一个html,点击<body></body>中间,先填入表格内容;

2、内容根据需求来写即可,示例代码如下:

<table>

<p style="text-align:center ">功课表</p>

<tr>

<th>语文</th>

<td>7:00-7:40</td>

<td>7:50-8:30</td>

</tr>

<tr>

<th>数学</th>

<td>7:00-7:40</td>

<td>7:50-8:30</td>

</tr>

<tr>

<th>英文</th>

<td>7:00-7:40</td>

<td>7:50-8:30</td>

</tr>

</table>

3、然后在<head></head>中间输入样式表的样式;

4、样式也根据个人的需求来设置即可,设置单元格的宽度高度,合并单元格,位置,颜色等等,示例代码如下:

<style type="text/css">

body

{

width:340px;

height :800px;

}

table

{

border-collapse :collapse ;

}

th,td

{

width:100px;

height:40px;

border :1px solid black;

font-size:12px;

text-align :center;

}   

</style>

5、这里需要注意这个代码“table”的意义是将表格边框合并为单一的边框,将相邻变合并。

6、预览结果如下所示,一个简单的表格就制作出来了。

在一个网页上做一个表单“用户名、密码、个人爱好"点击"提交"就在另一个网页显示出填的内容,代码要怎样写

马上写,你等等

1.asp代码如下:

<form action="2.asp" method="post" name="form1">

用户名:<input type="text" name="username" size="20" /><br />

密码:<input type="text" name="psword" size="20" /><br />

个人爱好:<input type="text" name="other" size="20" /><br />

<input type="submit" name="b1" value="提交" />

</form>

2.asp代码如下;

<%

response.write "用户名:"&request("username")&"<br />密码:"&request("psword")&"<br />个人爱好:"&request("other")

%>

二个文件入在同一文件夹下,运行1.asp,点提交

免责声明:内容来自网络,若侵犯您的权利,请在一个月内通知我们,会及时删除 @轻流