表单内容相关操作

1、表单内容只读:readonly="readonly":输入字段为只读

2、placeholder="content":提示信息,适用于 input 类型:text、search、url、tel、email 和 password

3、<fieldset><legned></legned></fieldset>:可以将表单中的多个元素分组显示,<legned></legned>给分组的<fieldset></fieldset>添加标题

  

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>fieldset和legend标签</title>
    </head>
    <body>
        <form action="" method="">
            <fieldset id="">
                <legend>账户信息</legend>
                <p>会员名:<input type="text" name="" id="" placeholder="请输入会员名" readonly="readonly"></p>
                <p>登录密码:<input type="password" name="" id=""></p>
                <p>验证码:<input type="text" name="" id="" value="xiaozhou" readonly="readonly"/></p>
            </fieldset>
        </form>
    </body>
</html>
账户信息

会员名:

登录密码:

验证码:

原文地址:https://www.cnblogs.com/xiaozhou223/p/11178690.html