I am using a form. when I click to log on, an event is triggered. The event is a function written in js. This function is used to check whether the user has entered the user name and password, at the same time, a form will be submitted, which uses the action Property to jump to the test to check whether the entered user name and password are the same as the user name and password in the database, the problem is that when I enter an empty user name and password, a prompt box written in js prompts me to enter the user name and password. However, when I click OK in the prompt box, the program still uses the php file in the action, instead of returning to the login box, solve php
I am using a form. when I click to log on, an event is triggered. The event is a function written in js. This function is used to check whether the user has entered the user name and password, at the same time, a form will be submitted, which uses the action Property to jump to the test to check whether the entered user name and password are the same as the user name and password in the database, the problem is that when I enter an empty user name and password, a prompt box written in js prompts me to enter the user name and password. However, when I click OK in the prompt box, the program still uses the php file in the action, do not return to the login box.