开发者

HTML - make input field selectable but not changeable

开发者 https://www.devze.com 2022-12-24 01:25 出处:网络
Like the youtube embed text fields. How do you ma开发者_Go百科ke a text field selectable but not changeable?<input type=\"text\" value=\"Some Text\" readonly=\"readonly\" />

Like the youtube embed text fields. How do you ma开发者_Go百科ke a text field selectable but not changeable?


<input type="text" value="Some Text" readonly="readonly" />


Another way to achieve this is just to make a div appear like a text field.

<div style="border: inset 2px #ccc;background:#fff;padding:2px;">
  http://example.com/?id=sdfsdfsdfsdfsdf
</div>
0

精彩评论

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