<form action="register.action" method="post"> <div class="register-top-grid"> <h3>注册新用户</h3> <div class="input"> <span>用户名 <label style="color:#15ec72;">不能为空</label></span> <input type="text" name="uname" placeholder="请输入用户名" required="required"> </div> <div class="input"> <span>真实姓名 <label style="color:#15ec72;">不能为空</label></span> <input type="text" name="urealname" placeholder="请输入真实姓名" required="required"> </div> <div class="input"> <span>密码 <label style="color:#15ec72;">不能为空</label></span> <input type="password" name="upwd" placeholder="请输入密码" required="required"> </div> <div class="input"> <span>收货电话<label></label></span> <input type="text" name="uphone" placeholder="请输入收货电话"> </div> <div class="input"> <span>收货地址<label></label></span> <input type="text" name="uaddress" placeholder="请输入收货地址"> </div> <div class="clearfix"> </div> </div> <div class="register-but text-center"> <input type="submit" value="提交"> <div class="clearfix"> </div> </div> </form>
时间: 2024-02-16 22:03:11 浏览: 138
好的,请看下面美化过的代码:
```html
<form action="register.action" method="post">
<div class="register-top-grid">
<h3>注册新用户</h3>
<div class="input">
<span>用户名 <label style="color:#15ec72;">不能为空</label></span>
<input type="text" name="uname" placeholder="请输入用户名" required="required">
</div>
<div class="input">
<span>真实姓名 <label style="color:#15ec72;">不能为空</label></span>
<input type="text" name="urealname" placeholder="请输入真实姓名" required="required">
</div>
<div class="input">
<span>密码 <label style="color:#15ec72;">不能为空</label></span>
<input type="password" name="upwd" placeholder="请输入密码" required="required">
</div>
<div class="input">
<span>收货电话<label></label></span>
<input type="text" name="uphone" placeholder="请输入收货电话">
</div>
<div class="input">
<span>收货地址<label></label></span>
<input type="text" name="uaddress" placeholder="请输入收货地址">
</div>
<div class="clearfix"></div>
</div>
<div class="register-but text-center">
<input type="submit" value="提交">
<div class="clearfix"></div>
</div>
</form>
```
代码美化后更加清晰易读,缩进、空格等都被处理得很好。
阅读全文