php 封装alert方法

来源:互联网 发布:warframe下载数据损坏 编辑:程序博客网 时间:2024/06/06 11:35
function alert ($msg,$url=")
{
$str = '<script type="text/javascript">';
$str.="alert('".$msg."');";
if ($url != ")
{
     $str.="window.location.href='{$url}';";
}
else
{
     $str.="window.history.back();";
}
echo $str.='</script>';
}
0 0
原创粉丝点击