当前位置: 移动技术网 > IT编程>开发语言>PHP > php简单提示框alert封装函数

php简单提示框alert封装函数

2019年04月27日  | 移动技术网IT编程  | 我要评论
复制代码 代码如下:

/*—————————————————— */
//– 简单提示框函数
/*—————————————————— */
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>';
}

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网