使用JQuery重点输入字段,而不选择当前值文本 [英] Focus input field with JQuery without selecting current value text

查看:99
本文介绍了使用JQuery重点输入字段,而不选择当前值文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$("#myinputfield").focus();

在输入字段中设置值已经设置会导致当前值被选中。

Doing that on an input field with it's value already set causes the current value to be selected. How can I focus the field without selecting the text?

推荐答案

我搜索了一下,有点发现你应该重点关注后,将您的价值重新设置到所需的字段中。

I've searched around a bit and kinda found out that you should re-set your value into the desired field after it is focussed on.

这篇关于使用JQuery重点输入字段,而不选择当前值文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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