自动突出显示焦点上的输入字段 [英] Auto-highlight an input field on focus

查看:99
本文介绍了自动突出显示焦点上的输入字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



<$ p

我想知道是否有输入框中的文本(预加载使用value =)来突出显示用户何时点击它? $ p> input type ='text'name ='url'id ='url'value ='http://www.a-link.com/'/>

编辑



我需要突出显示的文本,以便用户可以复制它。

解决方案

 < input type =textname =textboxvalue =Testonclick =this.select ()/> 


I was wondering if there was a way for text inside a input box (pre loaded using value="") to highlight when the user clicks on it?

input type='text' name='url' id='url' value='http://www.a-link.com/' />

EDIT

I need the text to he highlighted so the user can copy it.

解决方案

<input type="text" name="textbox" value="Test" onclick="this.select()" />

这篇关于自动突出显示焦点上的输入字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆