I have the following code:
function goForit() {
var passwd;
passwd = document.forms['giftForm'].pass.value;
if(passwd=="yes"){
window.open ('eat.html','_self',false)
}
else{
alert('Password wrong');
}
}
<form id="giftForm">
<input type="text" id="pass" placeholder="" style="font-size:150%;"/>
<br />
<input type="button" onClick="goForit()" value="Submit" style="font-size:100%; margin-top:15px;" />
</form>
If someone enters "yes" as the password and clicks the submit button. The user will be redirected to the eat.html page.
I want to pass the .carrot class with the redirect, so the proper image will appear. How do I add the .carrot class to the following code?