Form





<!doctype html> <html>

<head>

</head>

<body>

<form action="/">

Text: <input autofocus type="text" placeholder="your name." required /> <br>

Text: <input type="text" placeholder="統編8碼數字" pattern="[0-9]{8}" /> <br>

Password:<input type="password" placeholder="your password." /> <br>

Url:<input type="url" placeholder="http://your.domain" /> <br>

Email:<input type="email" placeholder="your@email.com" /> <br>

Search:<input type="search" placeholder="Search..." /> <br>




// Chrome X

Date:(Bad)<input type="date" /><br>

DateTime:(Bad)<input type="datetime" /><br>






Telephone:(Mobile Effect)<input type="tel" placeholder="0988-123-123" pattern="[0-9]{4}\-[0-9]{3}\-[0-9]{3}"/>EX:0988-123-123<br>




Radio:<input name="r1" type="radio" value="1" /> <br>

Radio:<input name="r1" type="radio" value="2" /> <br>




Number:<input type="number" min="10" max="20" step="2" value="15" />(10 ~ 20)<br>

Range:<input type="range" min="1" max="10" value="5" /> <br>

TextArea:<textarea placeholder="Comments..." ></textarea> <br>



<input type="submit" value="Send!" formaction="/" />

<input type="image" src="a.jpg" alt="Send!" formaction="/" />





Comments