How can I make a input code in a page that makes you go to a next page?

import wixLocation from ‘wix-location’;

$w.onReady(()=>{
	let myValue;
	$w('#input1').onChange(()=>{
		myValue = $w('#input1').value;
		console.log("My-Value: ", myValue);
	});
	
	$w('#myEnterCodeButtonIDhere').onClick(()>{
		wixLocation.to (myValue);
	});
});
  1. Add an input-element onto your page.
  2. Add the showed code above onto your page.
  3. Check all element-IDs.
  4. Type an web-address into the input and click onto your Enter-Code-Button.
  5. Also check the CONSOLE (this for you can deactivate…
//wixLocation.to (myValue);