HTML5中表单元素常用的属性设置

来源:互联网 发布:淘宝自动上下架软件 编辑:程序博客网 时间:2024/05/21 19:27
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
 <!--通过使用autocomplete属性,将某个标签的自动完成功能打开或关闭-->
 <!--通过使用autofocus属性,使某个标签在界面加载时就获取焦点-->
    <form action="demo-form.php" autocomplete="on">
        First name:<input type="text" name="fname"><br>
        Last name: <input type="text" name="lname" autofocus><br>
        E-mail: <input type="email" name="email" autocomplete="off"><br>
        <input type="submit">
    </form>
</body>
</html>
0 0