What to do if the cursor does not appear when clicking the input in HTML

藏色散人
Release: 2023-01-03 09:25:27
Original
4416 people have browsed it

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...)".

What to do if the cursor does not appear when clicking the input in HTML

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">
Copy after login

Use jquery directly to write the cursor when clicking the input

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

[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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!