<!DOCTYPE html>
<html> <head> <meta charset="utf-8" /> <title>hello</title> </head> <body> <form action="testform.php"method="get"> 请输入网址:<input type="url" list="url_list"name="weblink" placeholder="请输入正确的网址"/><datalist id="url_list"><option label="新浪" value="www.sina.com"></option><option label="百度" value="www.baidu.com"></option></datalist><input type="submit" value="提交" /></body>
</html>
利用placeholder
结果