<img src="http://files.jb51.net/file_images/article/201405/201405091054245.gif?201449105445" alt=""> <br>代码实现方式:<br><br><div class="msgheader"> <div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode68'));"><u>复制代码</u></span></div>代码如下:</div> <div class="msgborder" id="phpcode68"> <br>; <br><头> <br>新文档 <br><meta name="Generator" content="EditPlus"> <br><meta name="作者" content=""> <br><meta name="Keywords" content=""> <br><元名称=“描述”内容=“”> <br> <br> <br>div{ width:35%;margin-left:32%;} <br></style> <br></头> <br><身体> <br><div>; <br><form class="f1" action="http://www.baidu.com" method="get"> <br>; <br>表单的注册图例> <br> <br>; <br><tr ><td class=“left” width=40%align="right"><label for="t1">姓氏:</label></td> <br><td class="right"><input type="text" id="t1" name="Name"></td> <br></tr> <br><tr><td class=“left” width=40%align="right"><label for="Password1">密码:</label></td> <br><td class="right"><input id="Password1" type="password" name="Password" /></td> <br></tr> <br><tr><td class=“left” width=40%align="right"><label for="e1">邮箱:</label></td> <br><td class="right"><input type="email" id="e1" name="youyang"></td> <br></tr> <br><tr><td class=“left” width=40%align="right"><label for="1">性别:</label></td> <br><td class="right"><input type="radio" id="1" name="ssex" value="nan" />男<!-- name设置一样的就行了--> <br><input type="radio" id="2" name="ssex" value="nv" />女 <br></td> <br></tr> <br><tr><td class=“left” width=40%align="right">地区:</td> <br><td><选择 id="selc" name="place"> <br><option value="泉州">泉州</option>; <br>厦门选项> <br><option value="漳州">漳州</option>; <br></选择> <br></td> <br></tr> <br><tr><td class=“left” width=40%align="right"><label for="txtarea">简介:</label></td> <br><td><textarea id="txtarea"></textarea></td> <br></tr> <br><tr><td class=“left” width=40%align="right">兴趣:</td> <br><td><input type="checkbox" id="cbox1" name="dushu" value="c1">读书<br><input type="checkbox" id="cbox2" name ="yundong" value="c2">运动<br><input type="checkbox" id="cbox3" name="chihe" value="c3">吃喝<br>; <br></tr> <br><tr><td class=“left” width=40%align="right">上传:</td> <br><td> <input type="file" id="f1" name="shangchuan" value="File1" /></td> <br></tr> <br><tr><td class=“left” width=40%align=“right”rowspan=2> <br><input id="Submit1" type="submit" value="提交" />> <br></td> <br><td> <input id="Reset1" type="reset" value="重置" /> <br></td> <br></tr> <br></tbody> <br></表> <br></fieldset> <br></表格> <br></div> <br></身体> <br></html> <br> </form> </div> <br>注意其中的代码标签实现的功能是使鼠标在点击文本的时候自动聚焦在文本框里! <br><br><div class="msgheader"> <div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode69'));"><u>复制代码</u></span></div>代码如下:</div> <div class="msgborder" id="phpcode69"> <br><label for="t1">姓氏:</label> <br> </div> </div>