HTML DOM Email ¶ÔÏó
Email ¶ÔÏó
Email ¶ÔÏóÊÇ HTML5 ÖеÄжÔÏó¡£
Email ¶ÔÏó±íʾ HTML <email> ÔªËØ¡£
×¢ÊÍ£ºInternet Explorer 9£¨ÒÔ¼°¸üÔçµÄ°æ±¾£©»ò Safari ²»Ö§³Ö <input type="email"> ÔªËØ¡£
·ÃÎÊ Email ¶ÔÏó
Äú¿ÉÒÔͨ¹ýʹÓà getElementById() À´·ÃÎÊ <email> ÔªËØ£º
var x = document.getElementById("myEmail");
´´½¨ Email ¶ÔÏó
Äú¿ÉÒÔͨ¹ýʹÓà document.createElement() ·½·¨À´´´½¨ <email> ÔªËØ£º
var x = document.createElement("INPUT");
x.setAttribute("type", "email");
Email ¶ÔÏóÊôÐÔ
| ÊôÐÔ | ÃèÊö |
|---|---|
| autocomplete | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ autocomplete ÊôÐÔÖµ¡£ |
| autofocus | ÉèÖûò·µ»Ø email ×Ö¶ÎÔÚÒ³Ãæ¼ÓÔØºóÊÇ·ñÓ¦×Ô¶¯»ñÈ¡½¹µã¡£ |
| defaultValue | ÉèÖûò·µ»Ø email ×ֶεÄĬÈÏÖµ¡£ |
| disabled | ÉèÖûò·µ»Ø email ×Ö¶ÎÊÇ·ñ±»½ûÓᣠ|
| form | ·µ»Ø¶Ô°üº¬ email ×Ö¶ÎµÄ±íµ¥µÄÒýÓᣠ|
| list | ·µ»Ø¶Ô°üº¬ email ×Ö¶ÎµÄ datalist µÄÒýÓᣠ|
| max | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ max ÊôÐÔÖµ¡£ |
| min | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ min ÊôÐÔÖµ¡£ |
| name | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ name ÊôÐÔÖµ¡£ |
| pattern | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ pattern ÊôÐÔÖµ¡£ |
| placeholder | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ placeholder ÊôÐÔÖµ¡£ |
| readOnly | ÉèÖûò·µ»Ø email ×Ö¶ÎÊÇ·ñÊÇÖ»¶ÁµÄ¡£ |
| required | ÉèÖûò·µ»ØÔÚÌá½»±íµ¥Ö®Ç°ÊÇ·ñ±ØÐëÌîд email ×ֶΡ£ |
| size | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ size ÊôÐÔÖµ¡£ |
| step | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ step ÊôÐÔÖµ¡£ |
| type | ·µ»Ø email ×Ö¶ÎµÄ±íµ¥ÔªËØÀàÐÍ¡£ |
| value | ÉèÖûò·µ»Ø email ×Ö¶ÎµÄ value ÊôÐÔÖµ¡£ |
±ê×¼ÊôÐÔºÍʼþ
Ïà¹ØÒ³Ãæ
HTML ½Ì³Ì£ºHTML ±íµ¥
HTML ²Î¿¼Êֲ᣺HTML <input> ±êÇ©
HTML ²Î¿¼Êֲ᣺HTML <input> type ÊôÐÔ