PHP快速產生各種資訊氣球的方法,php產生資訊_PHP教程

來源:互聯網
上載者:User

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快速產生各種資訊氣球的方法。分享給大家供大家參考,具體如下:...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.