复制代码 代码如下: <BR>function func() <BR>{ <BR>if(confirm("Are you OK with this?")) <BR>{ <BR>this.location = "ok.php?action=ok"; <BR>} <BR>else <BR>{ <BR>this.location = "ok.php?action=cancel"; <BR>} <BR>} <BR> Please Click 复制代码 代码如下: if($_GET["action"]=="ok") { echo "I'm OK!"; } else { echo "I'm not OK!"; } ?>