How can I jump to another page by clicking the button? How can I click an image to jump to a new page? You can use the onclickwindow. location new page to realize how to jump to another page by clicking the button? We may need this in website production, because sometimes we need this effect, especially when we make a button into an image and click an image to jump to a new page, how can this problem be achieved?
This effect can be achieved through onclick = "window. location = 'new page.
1. directly jump to the original form using
The Code is as follows:
Window. location. href = "the page you want to jump ";
2. Open the page in the new form:
The Code is as follows:
Window. open ('page you want to jump ');
Window. history. back (-1); return to the previous page
The Code is as follows:
If you want to verify that the input amount is filled in when you click the button to submit, what should you do? When the user name is entered or other fields are empty, click the button to do not submit. You can follow the methods below.
The Code is as follows:
The Code is as follows: