开发者

Replace select element for input text on option selection

开发者 https://www.devze.com 2023-03-11 04:56 出处:网络
How can I change a select list for an input text when a specific option is 开发者_如何学运维selected using jQuery?<select onchange=\"if($(this).val()==2)$(this).replaceWith($(\'<input/>\'))\"

How can I change a select list for an input text when a specific option is 开发者_如何学运维selected using jQuery?


<select onchange="if($(this).val()==2)$(this).replaceWith($('<input/>'))">
  <option>1
  <option>2
  <option>2
</select>
0

精彩评论

暂无评论...
验证码 换一张
取 消