![](https://i-blog.csdnimg.cn/blog_migrate/3476b33f5133fa4259bf10e174f63191.png)
![](https://i-blog.csdnimg.cn/blog_migrate/949ec628a38eda812e8021e1921b347f.png)
![](https://i-blog.csdnimg.cn/blog_migrate/1a7253c9fb72ca895102a69ba140b1e6.png)
![](https://i-blog.csdnimg.cn/blog_migrate/0303e4e737618dbf6ef7aa1fb2977a5b.png)
简单的html语言会用,但涉猎不广泛。
一些陌生元素的笔记:
斜体:<i>This text is italic</i>
一条水平线:<hr> (horizontal rule)
保留文本中的空格和换行符,代码中文本样式与运行结果样式一致:<pre> </pre>
框架,通过使用框架,你可以在同一个浏览器窗口中显示不止一个页面:<iframe src="URL"></iframe>
表单:method 属性规定在提交表单时所用的 HTTP 方法(GET 或 POST)
关于 GET 的注意事项:
以名称/值对的形式将表单数据追加到 URL
永远不要使用 GET 发送敏感数据!(提交的表单数据在 URL 中可见!)
URL 的长度受到限制(2048 个字符)
对于用户希望将结果添加为书签的表单提交很有用
GET 适用于非安全数据,例如 Google 中的查询字符串
关于 POST 的注意事项:
将表单数据附加在 HTTP 请求的正文中(不在 URL 中显示提交的表单数据)
POST 没有大小限制,可用于发送大量数据。
带有 POST 的表单提交无法添加书签
提示:如果表单数据包含敏感信息或个人信息,请务必使用 POST!
target 属性规定提交表单后在何处显示响应。
_blank | 响应显示在新窗口或选项卡中。 |
_self | 响应显示在当前窗口中。 |
<form action="http://www.example.com/test.asp" method="post/get">
<input type="text" name="lastname" value="Nixon" size="30" maxlength="50">//常规文本输入
<input type="password">//密码字段,圆点或星号
<input type="checkbox" checked="checked">//定义复选框,checked默认选择
<input type="radio" name="sex" value="male" checked>Male//预定义选择male
<input type="radio" name="sex" value="female">Female//单选按钮
<input type="submit">//提交按钮
<input type="reset"><input type="hidden">
<select>
<option>Apples
<option selected>Bananas//预定义选择bananas
<option>Cherries
</select>//下拉选框
<textarea name="Comment" rows="60"cols="20">
</textarea>//<textarea> 元素定义多行输入字段(文本域)
<input type="button" οnclick="alert('Hello World!')" value="Click Me!">//按钮
</form>