html5点击input没有出现光标完美解决方案
html5点击input没有出现光标完美解决方案
<pre>
<input type="text" placeholder="输入姓名" class="inputname" id="id_name">
<input type="text" placeholder="输入手机" class="inputphone" id="id_phone">
</pre>
直接自己用jquery 写点击出现光标
<pre>
$('.inputname, .inputphone').on('touchstart',function () {
$(this).focus();
})
</pre>
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/

浙公网安备 33010602011771号