Home >Web Front-end >Front-end Q&A >What to do if the cursor does not appear when clicking the input in HTML
htmlThe solution to the problem that the cursor does not appear when clicking on the input: First open the corresponding HTML file; then use jquery to write the cursor when clicking on it. The code is such as "$('.inputname, .inputphone').on(' touchstart',function...)".
The operating environment of this article: Windows 7 system, HTML5, Dell G3 computer.
html5 The perfect solution for the cursor not appearing when clicking the input
<input type="text" placeholder="输入姓名" class="inputname" id="id_name"> <input type="text" placeholder="输入手机" class="inputphone" id="id_phone">
Use jquery directly to write the cursor when clicking the input
$('.inputname, .inputphone').on('touchstart',function () { $(this).focus(); })
[Recommended: HTML video tutorial]
The above is the detailed content of What to do if the cursor does not appear when clicking the input in HTML. For more information, please follow other related articles on the PHP Chinese website!