首页 > 其他 > 详细

14-3

时间:2019-10-25 01:11:04      阅读:116      评论:0      收藏:0      [点我收藏+]

input系列

input type=‘text‘ - name属性 value=‘alex‘,默认值
input type=‘password‘ - name属性 value=‘password‘,默认值
input type=‘submit‘ - value=‘提交‘ 提交按钮,提交表单
input type=‘button‘ - value=‘登录‘ 按钮

input type=‘radio‘ - 单选框 value, 默认值checked="checked",name属性(name相同则互斥)
input type=‘checkbox‘ -复选框 value,默认值checked="checked",name属性(批量获取数据)
input type=‘file‘ - 依赖form表单的一个属性 enctype="multipart/form-data"
input type=‘reset‘ - 重置

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form action="https://www.sogou.com/web">
        <input type="text" name="query" />
        <input type="submit" value="搜索" />
    </form>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form enctype="multipart/form-data">
        <div>
            <input type="text" name="user" />
            <p>请选择性别:</p>
            男:<input type="radio" name="gender" value="1" />
            女:<input type="radio" name="gender" value="2" checked="checked"/>
            Alex:<input type="radio" name="gender" value="3" />
            <p>爱好</p>
            篮球:<input type="checkbox" name="favor" value="1" />
            足球:<input type="checkbox" name="favor" value="2"  checked="checked" />
            排球:<input type="checkbox" name="favor" value="3" />
            台球:<input type="checkbox" name="favor" value="4"  checked="checked" />
            网球:<input type="checkbox" name="favor" value="5" />
            <p>技能</p>
            C:<input type="checkbox" name="skill" value="1" checked="checked" />
            Python:<input type="checkbox" name="skill" value="2" />
            <p>上传文件</p>
            <input type="file" name="fname" />
        </div>
        <input type="submit" value="提交" />
        <input type="reset" value="重置" />
    </form>
</body>
</html>

 

14-3

原文:https://www.cnblogs.com/python-abc/p/11735892.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!