/*php简单提示框自定义函数*/ function alert ($msg,$url="") { $str = ; $str.="alert(".$msg.");"; if ($url != "") { $str.="window.location.href={$url};"; } else { $str.="window.history.back();"; } echo $str.=; } ?>