Reputation: 1
Would like a pop up box with a question. If user press YES, they will be sent to mydomain.com. If they press NO they will be sent to yourdomain.com.
Is it possible?
Upvotes: 0
Views: 39
Reputation: 4091
You can use the browser's built-in confirmation box.
if (confirm('Switch?')) {
location.href = 'mydomain.com';
} else {
location.href = 'yourdomain.com';
};
If you want it customized and in HTML, then your question is far too broad.
Upvotes: 1