This article describes how to use display none and block to determine whether the account and password on the logon interface are empty. It has good reference value. Let's take a look at it below. This article mainly introduces how to use display none and block to determine whether the account and password on the logon interface are empty. It has good reference value. Let's take a look at it together with the small Editor.
If you do not want to use alert to display the account and password on the logon page, you need to use display to hide alert. Do not write the hidden content in the account and password p medium, otherwise, the screen resolution may vary. This is my lesson)
First, define the account, password, and hidden part id, that is, var x = document. getElementById ("id"), including the button id, and then click the login button (btn. onclick = function () {select specific hidden and displayed content}) to write a function to select hidden and displayed; In the reset button (btn. onclick = function () {cleared content, including the content displayed by the logon button })
The Code is as follows:
Please log on