PHP gevorderde |
|
zo kan het:
<script language="JavaScript">
var needToConfirm = true;
window.onbeforeunload = confirmExit;
function confirmExit()
{
if (needToConfirm)
return "Weet u het zeker?";
}
</script>
...
<input type="Submit" value="Save" onclick="needToConfirm = false;" />
<script language="JavaScript"> var needToConfirm = true; window.onbeforeunload = confirmExit; function confirmExit() { if (needToConfirm) return "Weet u het zeker?"; } </script> ... <input type="Submit" value="Save" onclick="needToConfirm = false;" />
|