<script> function code() { if(!confirm("Do you want to hear some music?")) history.go(-1); return"" } document.writeln(code()) </script>