Hi, if I run something like this to popup an alert 2 seconds after page-load, the alert pops up instantly:
<html>
<head>
<script type="text/javascript">
setTimeout(alert('Was it worth the wait?'), 5000);
</script>
</head>
<body>
<p>Hi!</p>
</body>
</html>
whereas if I double-quote the alert function, it is functioning as usual. Can anyone explain this?
<html>
<head>
<script type="text/javascript">
setTimeout("alert('Was it worth the wait?')", 5000);
</script>
</head>
<body>
<p>Hi!</p>
</body>
</html>