fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <body> <form action="form-action.php"> E-mail: <input type="email" id="myEmail" name="usremail"> <input type="submit"> </form> <p>点击 "尝试一下" 按钮设置 email 字段可输入多个邮箱地址。</p> <p><strong>提示:</strong> 在点击 “尝试一下” 按钮后尝试输入一个或多个邮箱,多个邮箱以逗号分隔,如: mail@example.com, mail2@example.com。</p> <button onclick="myFunction()">尝试一下</button> <p><strong>注意:</strong>Internet Explorer 9 及更早 IE 版本,Safari 浏览器不支持 input type="email 元素。</p> <p id="demo"></p> <script> function myFunction() { document.getElementById("myEmail").multiple = true; document.getElementById("demo").innerHTML = " email 字段现在允许输入多个值。"; } </script> </body> </html>
运行结果