Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

Input type URL ใน HTML5


ชนิดนี้รับค่า URL เท่านั้นใน HTML5 ใช้สำหรับฟิลด์อินพุตที่ควรมีที่อยู่ URL หากลองส่งข้อความธรรมดา จะบังคับให้ใส่เฉพาะที่อยู่ URL ในรูปแบบ https://www.qries.com หรือ https://qries.com

<!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>