/**
* 跳转方法
* @param $msg
* @param null $path
* @param null $parent
*/
public function alert($msg,$path=NULL,$parent=NULL){
if($parent === true){
$str=<<<str
<script>alert('{$msg}');parent.location.href='{$path}'</script>
str;
}else if(empty($path)){
$str=<<<str
<script>alert('{$msg}');history.back()</script>
str;
}else{
$str=<<<str
<script>alert('{$msg}');location.href='{$path}'</script>
str;
};
echo $str;
}
PHP 自定义 alert 跳转方法
最新推荐文章于 2021-08-06 13:37:30 发布