首页 >web前端 >前端问答 >html点击input没有出现光标怎么办

html点击input没有出现光标怎么办

藏色散人
藏色散人原创
2021-02-25 10:36:264575浏览

html点击input没有出现光标的解决办法:首先打开相应的HTML文件;然后用jquery写点击出现光标即可,代码如“$('.inputname, .inputphone').on('touchstart',function...)”。

html点击input没有出现光标怎么办

本文操作环境:Windows7系统、HTML5、Dell G3电脑。

html5点击input没有出现光标完美解决方案

<input type="text" placeholder="输入姓名" class="inputname" id="id_name">
<input type="text" placeholder="输入手机" class="inputphone" id="id_phone">

直接自己用jquery 写点击出现光标

$(&#39;.inputname, .inputphone&#39;).on(&#39;touchstart&#39;,function () {
$(this).focus();
})

【推荐:HTML视频教程

以上是html点击input没有出现光标怎么办的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn