javascript ok cancel pop-up button -
i've tried lot of things, still can access .js file inside form: please, can tell me how can done?
this trying call:
<script type="text/javascript"> if (confirm("press 'ok' leave, or 'cancel' if want stay: ")) { window.location="http://google.com"; } else { <a href="javascript:history.go(-1)">go back</a> } </script>
this how i've been trying call:
<input type="button" value="back main page" onclick= ??? >
thank you.
var answer = confirm ("press ok leave. cancel stay.") if (answer) window.location="http://google.com" else window.location="http://www.mysite.com/"
Comments
Post a Comment