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>

posted @ 2019-11-16 17:27  newmiracle宇宙  阅读(4416)  评论(0)    收藏  举报