HTML页面

HTML页面结构分析

 iframe内联框架

        

<!--内联框架
src: 地址
name: 框架标识名
wight: 宽
height : 高-->
<iframe src="" name="hello" frameborder="0"width="1000px"height="800px"></iframe>

<a href="https://mp.csdn.net/"target="hello">点击跳转</a>

表单form

<!--表单form
action : 表单提交的位置,可以是网站,也可以是一个请求处理地址
method:post,get 提交方式
        get: 我们可以在url中看到我们提交的信息,不安全,搞笑
        post:比较安全,传输大文件
value : 默认初始值
maxlength : 最长能写几个字符
size: 文本框长度-->

<form action="第一个网页.html"method="post">
<!--    文本输入框 input type="text"-->
    <p>名字: <input type="text"name="username" value="1234"maxlength="8" ></p>
<!--    密码框 input type="password" -->
    <p>密码: <input type="password"name="passwd"></p>
<!--单选框标签
input type="radio"
value : 单选框的值
name : 表示组
checked  默认值-->
    <p>性别:
        <input type="radio"value="boy" name="sex" checked/>男
        <input type="radio" value="girl" name="sex"/>女
    </p>
<!--多选框
input type="checkbox"
checked  默认值
-->
    <p>爱好:
        <input type="checkbox" value="sleep" name="hobby">睡觉
        <input type="checkbox" value="code" name="hobby">敲代码
        <input type="checkbox" value="chat" name="hobby">聊天
        <input type="checkbox" value="game" name="hobby">游戏
    </p>

<!--下拉框
select name ”列表名称“
option  列表值
selected  默认值
-->
    <p>国家:
        <select name="列表名称" >
            <option value="china">中国</option>
            <option value="us" selected>英国</option>
            <option value="eth">美国</option>
            <option value="sulian">苏联</option>
        </select>
    </p>
<!--    文本域
textarea name="文本域名称"
cols 行
rows 列
-->
    <p>反馈:
        <textarea name="textarea" cols="30" rows="10">文本内容</textarea>
    </p>
<!--    文件域
input type="file"
-->
    <p>文件域:
        <input type="file" name="files">
        <input type="button" value="上传" name="upload">
    </p>
<!--    邮件验证-->
    <p>邮箱:
        <input type="email" name="email">
    </p>
<!--    URL-->
    <p>URL:
        <input type="url" name="url">
    </p>
<!--    数字
step 步长-->
    <p>数字:
        <input type="number" name="number" max="100" min="0" step="10">
    </p>
<!--    滑块-->
    <p>音量:
        <input type="range" min="0" max="100" name="voice" step="2">
    </p>
<!--    搜索框-->
    <p>搜索:
        <input type="search" name="search">
    </p>
    <!--    按钮
input type="button" 普通按钮
input type="image"  图像按钮
input type="submit" 提交按键
input type="reset"  重置按钮
value 按钮名字
-->
    <p>按钮:
        <input type="button" name="btn1" value="点击变长">
        <input type="image" src="../resources/image/1.jpg" width="400" height="300">
    </p>

    <p>
        <input type="submit">
        <input type="reset">
    </p>
</form>

增加鼠标可用性

<!--增强鼠标可用性(点文字鼠标便进入输入框)
-->
    <label for="mark">点我</label>
    <input type="text" id="mark">

表单应用

隐藏域        hidden

只读        readonly       

禁用        disabled

表单的验证

placehlder        提示信息

required         非空判断

pattern        正则表达式

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值