H5表单

作者: 珲_cysky2018 | 来源:发表于2018-08-23 23:17 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>$$</title>
    <style>
        form{
            width: 600px;
            margin: 20px auto 0;
        }

        meter,
        input{
            width: 100%;
            margin: 10px 0;
            border:none;
            border:1px solid #cccccc;
            border-radius: 4px;
            height: 30px;
            line-height: 30px;
            font-size: 16px;
            padding-left: 10px;
            box-sizing: border-box;


        }

        meter{
            padding: 0;
        }
    </style>
</head>
<body>
<form action="">
    <fieldset>
        <legend>学生档案</legend>
        <label for="name">姓名:</label><input type="text" name="name" id="name" autocomplete="off" autofocus placeholder="请输入用户名">
        <label for="phone">手机号码:</label><input type="tel" name="phone" id="phone">
        <label for="email">邮箱地址:</label><input type="email" name="email" id="email">
        <label for="text">所属学院:</label><input type="text" name="text" id="text" list="collage">
        <datalist id="collage">
            <option value="文学院"></option>
            <option value="商学院"></option>
            <option value="工学院"></option>
            <option value="美学院"></option>
            <option value="医学院"></option>
        </datalist>
        <label for="score">入学成绩:</label><input type="number" name="score" id="score" min="0" max="100" value="0">
        <label for="basic">基础水平:</label><meter id="basic" max="100" min="0" low="59" high="89" value="0"></meter>
        <label for="enter">入学日期:</label><input type="date" name="enter" id="enter">
        <label for="leave">入学日期:</label><input type="date" name="leave" id="leave">
        <input type="submit" value="提交">
    </fieldset>
</form>
<script>
   document.getElementById("score").oninput = function(){
       document.getElementById("basic").value = this.value;
   }
</script>
</body>
</html>

相关文章

  • h5新增元素&废弃元素

    h5新增元素 h5新增表单元素 h5废弃元素

  • H5表单

    H5表单 1. HTML4 form表单复习 input 表单type属性值 text ...

  • H5学习从0到1-H5的表单(11)

    H5的表单元素 form:表单 input:输入域,type属性可以设置text,password,button等...

  • 3_H5增强表单

    H5增强的表单 form元素及属性 form元素 用来定义一个表单,是建立表单的基础元素,(就类似定义表格的tab...

  • 2018-05-14

    h5新特性 一.表单元素的补充 1.电子邮箱:

  • H5提纲布局

    传统布局与HTML5布局和H5新语义标签 传统网页布局 H5 经典网页布局 H5新语义标签 输入类型 (表单类型,...

  • js验证表单提交

    普通的H5表单验证存在一定的不足,所以需要通过js进行验证 以下是表单html以及css代码:

  • h5上传文件的方法

    h5上传文件的方法: H5标签提供了原生的 input[type=file] 标签支持文件上传功能。类似于表单提交...

  • H5表单

  • H5 表单

    H5新的Input类型 H5新增了多个新的表单输入类型。这些类型提供了更好的输入控制和验证 这些类型包括: ema...

网友评论

      本文标题:H5表单

      本文链接:https://www.haomeiwen.com/subject/bysviftx.html