- <!DOCTYPE html>
- <html lang="en,zh">
- <head>
- <meta charset="utf-8">
- <title>表单</title>
- <link rel="stylesheet" type="text/css" href="F:form.css">
- </head>
- <body background="F:\web\form\图片\背景.jpg">
- <form style="display:block;position:fixed;top:20px;left:100px;width:400px;height:300px;border: 1px solid #006600"method="get" action="" >
- <h1>表单</h1>
- <div>
- <p>
- username:<input type="txet" name="username" value="请输入用户名" style="color:#999" οnfοcus="if(this.value=='请输入用户名'){this.value='';this.style.color='#424242'}" οnblur="if(this.value==''){this.value='请输入用户名';this.style.color='#999'}">
- </p>
- <p>
- password:<input type="password" name="username">
- </p>
- <p>
- 性别:
- 男<input type="radio" name="性别" value="男">
- 女<input type="radio" name="性别" value="女">
- </p>
- <p>
- 邮箱:<input type="txet" name="username" value="请输入邮箱" style="color:#999" οnfοcus="if(this.value=='请输入邮箱'){this.value='';this.style.color='#424242'}" οnblur="if(this.value==''){this.value='请输入邮箱';this.style.color='#999'}">
- </p>
- <p>
- 爱好:
- 阅读<input type="checkbox" name="爱好" value="阅读">
- 动漫<input type="checkbox" name="爱好" value="动漫">
- 篮球<input type="checkbox" name="爱好" value="篮球">
- 足球<input type="checkbox" name="爱好" value="足球">
- 电竞<input type="checkbox" name="爱好" value="电竞">
- </p>
- </div>
- <input type="submit">
- </form>
- </body>
- </html>
效果图