PHP快速產生各種資訊氣球的方法,php產生資訊
本文執行個體講述了PHP快速產生各種資訊氣球的方法。分享給大家供大家參考,具體如下:
function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0) //系統提示資訊{/**$msg 資訊提示的內容*$gourl 需要跳轉的網址*$onlymsg 1 表示不自動跳轉 0表示自動跳轉*$limittime 跳轉的時間*/ global $dsql, $cfg_ver_lang; if (eregi ( "^gb", $cfg_ver_lang )) $cfg_ver_lang = 'utf-8'; $htmlhead = "\r\n\r\n系統提示\r\n\r\n"; $htmlhead .= "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"; if ($limittime == 0) $litime = 5000; else $litime = $limittime; if ($gourl == "-1") { if ($limittime == 0) $litime = 5000; $gourl = "javascript:history.go(-1);"; } if ($gourl == "" || $onlymsg == 1) { $msg = ""; } else { $func = " var pgo=0; function JumpUrl(){ if(pgo==0){ location='$gourl'; pgo=1; } }\r\n"; $rmsg = $func; $rmsg .= "document.write(\"
系統提示資訊:\");\r\n"; $rmsg .= "document.write(\"
\");\r\n"; $rmsg .= "document.write(\"" . str_replace ( "\"", "“", $msg ) . "\");\r\n"; $rmsg .= "document.write(\""; if ($onlymsg == 0) { if ($gourl != "javascript:;" && $gourl != "") { $rmsg .= "
如果你的瀏覽器沒反應,請點擊這裡..."; } $rmsg .= "
\");\r\n"; if ($gourl != "javascript:;" && $gourl != "") { $rmsg .= "setTimeout('JumpUrl()',$litime);"; } } else { $rmsg .= "
\");\r\n"; } $msg = $htmlhead . $rmsg . $htmlfoot; } if (isset ( $dsql ) && is_object ( $dsql )) @$dsql->Close (); echo $msg;}
更多關於PHP相關內容感興趣的讀者可查看本站專題:《PHP基本文法入門教程》、《php常用函數與技巧總結》及《php物件導向程式設計入門教程》
希望本文所述對大家PHP程式設計有所協助。
您可能感興趣的文章:
- PHP 實作類別似js中alert() 提示框
- PHP彈出提示框並跳轉到新頁面即重新導向到新頁面
- 用PHP實現彈出訊息提示框的兩種方法
- php+ajax做仿百度搜尋下拉自動提示框(有執行個體)
- php簡單提示框alert封裝函數
http://www.bkjia.com/PHPjc/1098690.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1098690.htmlTechArticlePHP快速產生各種資訊氣球的方法,php產生資訊 本文執行個體講述了PHP快速產生各種資訊氣球的方法。分享給大家供大家參考,具體如下:...