There is a code
<html> <head> <script type="text/javascript"> function delPost($num) { x=confirm("Вы действительно хотите удалить пост?"); if (x==true) { window.location.href = линк } } } </script> </head> <body> <input type="button" onclick="javascript: delPost(1)" value="тест"></input> </body>
However, when the button is pressed, nothing happens, although it should pop up a confirmation window.
What am I doing wrong?