RUNOOB.COM
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> <style> input:focus { background-color:yellow; } </style> </head> <body> <form action="demo-form.php" method="get"> First name: <input type="text" name="fname" /><br> Last name: <input type="text" name="lname" /><br> <input type="submit" value="提交" /> </form> <p><b>注意:</b>仅当 !DOCTYPE 已经声明时 IE8 支持 :focus.</p> </body> </html>
运行结果