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>

猜你喜欢

转载自www.cnblogs.com/newmiracle/p/11872567.html