<html> <head> <title>MyForm</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <form action="#" method="get" name="MyForm" id="myForm"> <input type="text" name="username" id="username" value="张三"/> <br /> <input type="password" name="password" id="password"/> <br /> <label> <input type="radio" name="sex" value="male" checked="checked"/> 男</label> <label> <input type="radio" name="sex" value="female"/> 女</label> <br /> <label> <input type="checkbox" name="hobbie" value="football"/> 足球</label> <label> <input type="checkbox" name="hobbie" value="baskeball" checked="checked"/> 篮球</label> <label> <input type="checkbox" name="hobbie" value="volleyball"/> 排球</label> <br /> <input type="file" name="myFile" id="myFile"/> <br /> <input type="hidden" name="myHidden" value="hello"/> <input type="submit" value="登陆"/> <input type="reset" value="重写"/> </form> </body> </html>
效果如下
-----------------------------
MyForm