这仅接受HTML5中的URL值。此类型用于应包含URL地址的输入字段。如果您尝试提交简单文本,它将强制仅以http://www.qries.com格式或http://qries.com 格式输入URL地址。
<!DOCTYPE HTML> <html> <body> <form action = "/cgi-bin/html5.cgi" method = "get"> Enter URL : <input type = "url" name = "newinput" /> <input type = "submit" value = "submit" /> </form> </body> </html>