In js, set the user to read a certain agreement before checking the login or registration (disabled usage skills) Look carefully at the two pictures and you will see that the circled parts are different. When the scroll wheel is on top, the form below is not selectable The second sheet at the bottom is optional The method is to monitor the scroll wheel. When the scroll wheel reaches the bottom, the form becomes selectable. info.scrollHeight - info.scrollTop == info.clientHeight //Judge whether the scroll bar has reached the bottom <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style type="text/css"> #info{ width: 200px; height: 500px; background-color: #00FFFF; overflow:auto; } </style> <script type="text/javascript"> window.onload = function(){ /* *The form item is available when the vertical scroll bar reaches the bottom * onscroll * This event will be triggered when the scroll bar scrolls * */ var info = document.getElementById("info"); var inputs = document.getElementsByTagName("input"); info.onscroll = function(){ //Check if the scroll bar has scrolled to the bottom if(info.scrollHeight - info.scrollTop == info.clientHeight){ //Scroll bar to the bottom and form items are available inputs[0].disabled = false; inputs[1].disabled = false; } } } </script> <title></title> </head> <body> <h1>Welcome new users to register</h1> : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : <input type="checkbox" name="" id="" value="" disabled="disabled"/>I have read the agreement carefully and will abide by it <input type="submit" value="Register" disabled="disabled"/><!-- If you add disabled="disabled" to the form, the form item will become unavailable--> </body> </html> This method does not apply to Chrome, but other browsers can This is the end of this article about the example of how to implement a protocol that users must check in javascript. For more relevant content about how to implement a protocol that users must check in javascript, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Linux kernel device driver Linux kernel module loading mechanism notes summary
>>: A brief discussion on common operations of MySQL in cmd and python
The decompressed version of MYSQL is installed 1:...
1. Pull the image docker pull registry.cn-hangzho...
Three knowledge points: 1. CSS descendant selecto...
In the previous chapters, we introduced how to ch...
Download the installation package from the offici...
Generally, we rarely meet HR, but once we do, it c...
System tray icons are still a magical feature tod...
CSS scroll bar style modification code .scroll::-...
Routing configuration commands under Linux 1. Add...
Download and install JDK Step 1: First download t...
This article mainly introduces an example of impl...
ElementUI implements a table tree list loading tu...
Table of contents 1. Project Environment 2. Proje...
1. Normal background blur Code: <Style> htm...
Table of contents background How does element-ui&...