JavaScript determines whether the user has operated the page

韦小宝
Release: 2018-01-11 10:17:04
Original
2212 people have browsed it

This article mainly introducesjavascriptrelated information to determine whether the user has operated the page. I hope this article can help everyone learn js better. Friends who are interested in js can refer to this article. Article

javascript Determine whether the user has operated the page

Using js to determine whether the user has operated the page, all we have to do is organize our ideas.

1. Ideas

Whether the user has an operation interface, we can consider whether the page triggers theeventwithin the specified time. For example, whether the user clicked, pressed a button, or rolled the mouse wheel. Did the user move the mouse, etc. If the user does not perform these operations, then we can roughly think that the user does not operate the page. We can give atimer. To record whether the user triggers these events within the specified time. I will post the code directly. I will not explain the specific meaning of the code. The idea is roughly like this.

2. Code Demonstration

    js判断用户有没有操作页面 
        js判断用户有没有操作页面 
    =
Copy after login

The above is all the content of this article, I hope it will be helpful to everyone's learning!

Related recommendations:

How to implement modularization in JS

JS simple implementation of sliding loading data example sharing

JS remove all commas in a string detailed example

The above is the detailed content of JavaScript determines whether the user has operated the page. 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
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!