源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> </head> <body> <form action="action_page.php"> <input type="text" name="fname" placeholder="First name"><br> <input type="text" name="lname" placeholder="Last name"><br> <input type="submit" value="Submit"> </form> <p><strong>注意:</strong> IE9和更早版本不支持placeholder属性 </p> </body> </html>
运行结果