HTML <input> ±êÇ©µÄ disabled ÊôÐÔ

ʵÀý

´øÓÐÒ»¸ö½ûÓÃÊäÈë×Ö¶ÎµÄ HTML ±íµ¥£º

<form action="form_action.asp" method="get">
  <p>First name: <input type="text" name="fname" /></p>
  <p>Last name: <input type="text" name="lname" disabled="disabled" /></p>
  <input type="submit" value="Submit" />
</form>

Ç××ÔÊÔÒ»ÊÔ

¶¨ÒåºÍÓ÷¨

disabled ÊôÐԹ涨Ӧ¸Ã½ûÓà input ÔªËØ¡£

±»½ûÓÃµÄ input ÔªËØ¼È²»¿ÉÓã¬Ò²²»¿Éµã»÷¡£¿ÉÒÔÉèÖà disabled ÊôÐÔ£¬Ö±µ½Âú×ãijЩÆäËûµÄÌõ¼þΪֹ£¨±ÈÈçÑ¡ÔñÁËÒ»¸ö¸´Ñ¡¿òµÈµÈ£©¡£È»ºó£¬¾ÍÐèҪͨ¹ý JavaScript À´É¾³ý disabled Öµ£¬½« input ÔªËØµÄÖµÇл»Îª¿ÉÓá£

×¢ÊÍ£ºdisabled ÊôÐÔÎÞ·¨Óë <input type="hidden"> Ò»ÆðʹÓá£

Óï·¨

<input disabled="value">

ÊôÐÔÖµ

Öµ ÃèÊö
disabled ½ûÓÃÒ»¸ö input ÔªËØ¡£
VUE