I want the input tag to have a single correct answer. When entering a response (here we'll call it "example2"), go to a certain page (here, we'll use " link ").
I want the input tag to have a single correct answer. When entering a response (here we'll call it "example2"), go to a certain page (here, we'll use " link ").
If your goal is to open a particular Web page according to the user's response. This would be a possible solution:
function change(value){
switch(value){
case 'exemplo2':
window.open('https://www.google.com.br');
}
}
<input type='text' placeholder='Digite:' onchange='change(value)'/>
If you test in a web browser, you will see that responding to 'example2' a new web page with the Google address will open.