前端基础知识-html基础
一、Web前端三大核心技术
- HTML:负责显示网页的内容
- CSS:负责网页的样式、美化
- js:负责网页的行为
二、标签
- input 标签
input的type属性值不同功能不同
<!--
input的type属性值不同
text:文本框
password:密码
radio:单选
如何做到单选按钮:相同一组才能单选,相同的name值
checkbox:复选框
button:按钮
-->
用户名: <input type="text" name="username"/>
<br/>
密码:<input type="password" name="pwd"/>
<br/>
性别:<input type="radio" name="sex" value="1"/> 男
<input type="radio" name="sex" value="0" /> 女
<br/>
您的爱好:
<input type="checkbox" name="horner">游泳
<input type="checkbox" name="horner">下棋
<input type="checkbox" name="horner">旅游
- 表单标签
说明:页面提交输入信息需要使用表单标签
属性:action:将表单数据提交到哪个页面
method:
get: 1. 参数在url中显示 2、速度相对于post快 3、提交内容长度有限制
post:1.参数不在url中显示 2.速度相对get慢 3.提交内容长度无限制
场景:get在查询中使用
post在提交数据中使用(登录、注册)
<form action="" method="post">
用户名:<input type="text" /><br/>
密码:<input type="password"/>
</form>
还没有评论,来说两句吧...