I was wondering how I might redirect to a page after a user enter information into a prompt and clicks OK, something like this:
var Input = prompt("Message:");
if (//Button clicked, and Input not empty\\) {
//Sanitize input
//Redirect to https://www.MyWeb.com/?Message=INPUT
}
Lots of people ask about things like alert()
and confirm()
, but I haven't found anything to do with prompt()