php簡單提示框alert封裝函數
更新時間:2010年08月08日 17:47:44 作者:
php自定義函數之簡單提示框alert,方便輸出提示信息。
復制代碼 代碼如下:
/*—————————————————— */
//– 簡單提示框函數
/*—————————————————— */
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>';
}
相關文章
解析php addslashes()與addclashes()函數的區(qū)別和比較
本篇文章是對php中的addslashes()與addclashes()函數的區(qū)別進行了詳細的分析介紹,需要的朋友參考下2013-06-06