实例
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>input</title> </head> <style type="text/css"> body{ background: url(https://img.php.cn/upload/course/000/013/745/5a4c6aa9aa69f485.jpg); background-repeat: no-repeat; background-size: 100% 100%; } </style> <body> <form action="#" method="GET" > <table cellpadding="8" cellspacing="0" border="0" align="center" bgcolor="powderblue" > <caption><h2>§ QQ注册 §</h2></caption> <tr> <td colspan="2"><hr></td> </tr> <!-- 用户名 --> <tr align="center"> <td align="right"> <label for="name">网名:</label> </td> <td align="left"> <input type="text" name="name" id="name" value="" placeholder="请输入你的网名" size="40"> </td> </tr> <!-- 邮箱注册 --> <tr align="center"> <td align="right"> <label for="email">邮箱:</label> </td> <td align="left"> <input type="email" name="email" id="email" value="" placeholder="请输入邮箱" size="40"> </td> </tr> <!-- 确认密码 --> <tr align="center"> <td align="right"> <label for="password">密码:</label> </td> <td align="left"> <input type="password" name="password" id="password" value="" placeholder="输入你的密码" size="40"> </td> </tr> <!-- 性别 --> <tr align="center"> <td align="right"> <label>性别:</label> </td> <td align="left"> <input type="radio" name="sex" value="male">男 <input type="radio" name="sex" value="female">女 <input type="radio" name="sex" value="secret" checked="">保密 </td> </tr> <!-- 下拉选择 --> <tr align="center"> <td align="right"> <label>码农:</label> </td> <td align="left"> <select name="level"> <option value="0">html</option> <option value="1">css</option> <option value="2">js</option> <option value="3">jq</option> <option value="4" selected>php</option> </select> </td> </tr> <!-- 多选 --> <tr align="center"> <td align="right"> <label>兴趣:</label> </td> <td align="left"> <input type="checkbox" name="hobby[]" value="a">读书 <input type="checkbox" name="hobby[]" value="b">练字 <input type="checkbox" name="hobby[]" value="c">练武 <input type="checkbox" name="hobby[]" value="d" checked="">看片 </td> </tr> <!-- 图片上传 --> <tr align="center"> <td align="right"> <label for="file">头像:</label> </td> <td align="left"> <img src="https://img.php.cn/upload/course/000/013/745/5aa0a4be6be3c853.jpg" alt="" width="40"> <input type="file" name="file" id="file" > </td> </tr> <!-- textarea --> <tr align="center"> <td align="right"> <label for="commnet">简介:</label> </td> <td align="left"> <textarea name="comment" id="commnet" rows="5" cols="40"></textarea> </td> </tr> <!-- 提交按钮 --> <tr> <td colspan="2"> <hr> <p align="center"> <input type="submit" name="submit" value="注册"> <input type="reset" name="reset" value="重置"> </p> </td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手写作业