Posted in PHP onMarch 09, 2009
<SCRIPT Language = "JavaScript"> function func() { if(confirm("Are you OK with this?")) { this.location = "ok.php?action=ok"; } else { this.location = "ok.php?action=cancel"; } } </SCRIPT> <html> <head> </head> <body> <a href="#" href="#" onClick="javascript:func();">Please Click</a> </body> </html>
<?php if($_GET["action"]=="ok") { echo "I'm OK!"; } else { echo "I'm not OK!"; } ?>
在JavaScript中调用php程序
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@