• 13-input标签


    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>input标签</title>
    </head>
    <!-- 
        input标签
            type        元素类型
                text        文本框
                password    密码框
                radio       单选框
                checkbox    多选框
                file        文件上传域
                hidden      隐藏域
                button      普通按钮
                submit      提交按钮
                reset       重置按钮
                date/date-local 日期框
            value       元素默认值
            readonly    只读属性
            maxlength   最多输入的长度
            disabled    禁用标签
    
            注意:
                1.单选框需要通过name属性设置为一组
                2.如果是上传文件的表单,则表单需要设置一个属性 enctype="nultipart/fprm-data",提交方式为post请求
                3.没有name属性是无法提交对应元素的值
     -->
    <body>
        <form action="">
            文本框:<input type="text" value="默认值1"  maxlength="10"><br>
            文本框:<input type="text" value="默认值1" readonly maxlength="10"><br>
            密码框:<input type="password" ><br>
            单选框:<input type="radio" name="sex" id="man"><label for="man">男</label>  
                    <input type="radio" name="sex" id="women"><label for="women">女</label>  
                    <br>
            复选框:<input type="checkbox" value="1" name="test" id="">1
            <input type="checkbox" value="1" name="test" id="">2
            <input type="checkbox" value="1" name="test" id="">3
            <br>
            文件域: <input type="file" name="" id=""> <br>
            隐藏域:<input type="hidden" name="" value="admin">
            按钮<br>
            普通按钮: <input type="button" value="普通按钮" disabled> <br>
            提交按钮: <input type="submit" value="提交按钮"> <br>
            重置按钮: <input type="reset" value="重置按钮"> <br>
            日期框: <input type="date" name="" id="">
            日期框: <input type="datetime-local" name="" id="">
    
        </form>
    </body>
    </html>
    
    这世上所有美好的东西,都需要踮起脚尖。
  • 相关阅读:
    centOS和windows7双系统下重装windows后恢复centOS引导
    第一天
    Spring初学
    myBatis-一级缓存与二级缓存
    myBatis-类型关联
    myBatis-智能标签
    myBati初学
    myBati初学
    博客系统开发
    Y2分班考试 笔试题总结
  • 原文地址:https://www.cnblogs.com/XMYG/p/14319514.html
Copyright © 2020-2023  润新知