• 初识HTML_表单


    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title></title>
    	</head>
    	<body>
    		<form action="" method="">
    			<table width="600px" border="1px" cellspacing="0" cellpadding="">
    				<tbody>
    					<tr height="40px">
                            <td rowspan="4" align="center">总体信息</td >
                            <td colspan="2"></td>
                        </tr>
    					<tr height="40px">
                            <td align="center">用户名</td>
                            <td><input type="text" name="" id="" value="" /></td>                       </tr>
    					<tr height="40px">
                            <td align="center">密码</td>
                            <td><input type="password" name="" id="" value="" />
                            </td>
                        </tr>
    					<tr height="40px">
                            <td colspan="2"><input type="submit" name="" id="" value="提交" />
                                <input type="button" name="" id="" value="重置" />
                            </td>
                        </tr>
    				</tbody>
    			</table>
    		</form>
    	</body>
    </html>
    
    
    1. form必须有action属性,表示提交的地址
    2. 所有需要提交的数据,input必须有name属性
    3. input按钮的文字,使用value属性表示
    4. input必须放在form标签内才能提交
    5. type的类型
      • text:文本输入框
      • password:密码输入框
      • radio:单选框
      • checkbox:复选框
      • button:普通按钮
      • reset:重置按钮
      • file:文件选择框
    6. get请求和post请求的区别
      • get通常表示获取数据
      • post通常表示提交数据
      • get发送的数据都写在地址栏上,用户可见
      • post发送的数据用户不可见
      • get请求不能提交大量数据,但post可以,因此不要混用
  • 相关阅读:
    flask全栈开发3 模板
    flask全栈开发2 URL与视图
    flask全栈开发1 课程简介
    微信公众号开发中遇到的问题总结
    python web学习路线
    内存数据库Memcached和redis基本使用
    2019年8月12号成长题目
    2019年8月10号成长题目
    2019年8月7号成长题目
    SpringCloud简介与5大常用组件
  • 原文地址:https://www.cnblogs.com/SSPOFA/p/11728889.html
Copyright © 2020-2023  润新知