MichaelMelin MichaelMelin - 1 year ago 67
Javascript Question

How to use user's input on a prompt to search something up on wiki

I am trying to make it so the user input is searched on wiki or whatever site.

var input = prompt();

if(input === "") {
window.location.href = ("https://en.wikipedia.org/wiki/Steve_Jobs");


Answer Source
var input = prompt();

if (input !== "") {
    window.location.href = ("https://en.wikipedia.org/wiki/" + input);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download