How to jump page through the prompt box in JS

Source: Internet
Author: User

Jump to a page by using the Prompt box

1<!doctype html>2"en">34<meta charset="UTF-8">5<title>Document</title>67<body>8<script>9Window.onload = function () {//set to execute when the page loadsTen         varBTN =document.getelementsbytagname ("Button")[0]//Get BTN Element OneBtn.onclick = function () {//Add a Click event to the button A             varAnswer = confirm ("do you want to visit Ziksang Blog Park")//Assign the confirmation box to answer -             if(answer)//Determine if click OK -Window.location ="" //determine the words of the viewer itself jump the         } -  -     } -</script> +<button> Click Jump </button> -</body> +

How to jump page through the prompt box in JS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.