Only when clicking the Reply button should go to the example.com page
<html> <head> <title></title> </head> <body> <script language="JavaScript"> function F1() { if (document.getElementById("text").value == '4') alert('Молодец!'); else alert('Подумай еще!'); } </script> <b>2+2=</b> <input id="text" name="text" type="text" value=""> <input OnClick="F1();" name="button" type="button" value="Ответить"> </body> </html>