简易表单

 账号:
 <input type="text" name="zhanghao"  /><br /><br />
 密码:<input type="password" name="mima"/><br /><br />
 爱好:<input type="checkbox" name="aihao" checked />体育
<input type="checkbox" name="aihao" />唱歌
<input type="checkbox" name="aihao"  checked="checked" />阅读
<input type="checkbox" name="aihao" />旅游<br /> <br />
性别:<input type="radio" name="xingbie" checked="checked" />男
<input type="radio" name="xingbie" />女<br /><br />
自我介绍:<textarea rows="5" cols="30">
   这里是自我介绍
</textarea><br /><br /><br />
地址:
  <select name="地址">
  <option value="北京">北京</option>
  <option value="上海">上海</option>
  <option value="广州">广州</option>
  <option value="深圳">深圳</option>
  <option value="河北">河北</option>
  <option value="天津">天津</option>
  <option value="重庆">重庆</option>
  <option value="河南">河南</option>
  </select><br /><br /><br />
  
<input type="submit" value="提交" />
<input type="reset" value="重置" />
<button value="按钮">按钮</button>

以上内容写在form标签中即可

<textarea rows="5" cols="30"></textarea>

这句命令的意思为添加可输入多行文字的文本框

checkbox为复选框,radio为单选框,在input标签中添加 checked="checked"则为默认选中

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这里给你一个简易的HTML代码示例,包含账号密码输入框和登录/注册按钮。你可以根据需要进行修改和美化。 ``` <!DOCTYPE html> <html> <head> <title>Login/Register Form</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> form { display: flex; flex-direction: column; align-items: center; margin-top: 50px; } input[type=text], input[type=password] { width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } button[type=submit] { background-color: #4CAF50; color: white; padding: 14px 20px; margin: 8px 0; border: none; border-radius: 4px; cursor: pointer; } button[type=submit]:hover { background-color: #45a049; } </style> </head> <body> <form action="login.php" method="post"> <h2>Login</h2> <label for="username"><b>Username</b></label> <input type="text" placeholder="Enter Username" name="username" required> <label for="password"><b>Password</b></label> <input type="password" placeholder="Enter Password" name="password" required> <button type="submit">Login</button> </form> <form action="register.php" method="post"> <h2>Register</h2> <label for="username"><b>Username</b></label> <input type="text" placeholder="Enter Username" name="username" required> <label for="password"><b>Password</b></label> <input type="password" placeholder="Enter Password" name="password" required> <button type="submit">Register</button> </form> </body> </html> ``` 这是一个基础的HTML表单,如果你需要在后台进行账号密码验证和注册等操作,需要编写相应的PHP或其他服务器端脚本。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值