织梦程序默认提示框很丑发现美,今天我们提供一个修改教程,把提示框美化下。

实现教程
打开 /include/common.func.php 找到 大概在278行的
把整个函数改成
01 | function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) |
03 | if (empty($GLOBALS[ 'cfg_plus_dir' ])) $GLOBALS[ 'cfg_plus_dir' ] = '..' ; |
08 | <meta http-equiv= "Content-Type" content= "text/html; charset=gb2312" /> |
09 | <meta name= "viewport" content= "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" > |
10 | <meta name= "renderer" content= "webkit" > |
11 | <meta http-equiv= "Cache-Control" content= "no-siteapp" />"; |
12 | $htmlhead .= "<base target= '_self' /> |
13 | <style>div{line-height:160%;}</style></ head > |
14 | <body leftmargin= '0' topmargin= '0' bgcolor= '#FFFFFF' > ".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')." |
18 | $htmlfoot = "</script> |
24 | $litime = ($limittime==0 ? 1000 : $limittime); |
29 | if ($limittime==0) $litime = 5000; |
30 | $gourl = "javascript:history.go(-1);" ; |
33 | if ($gourl== '' || $onlymsg==1) |
35 | $msg = "<script>alert(" ".str_replace(" "" , "“" ,$msg). "" );</script>"; |
39 | //当网址为:close::objname 时, 关闭父框架的 id =objname元素 |
40 | if (preg_match( '/close::/' ,$gourl)) |
42 | $tgobj = trim(preg_replace( '/close::/' , '' , $gourl)); |
43 | $gourl = 'javascript:;' ; |
44 | $func .= "window.parent.document.getElementById( '{$tgobj}' ).style.display= 'none' ; |
50 | if (pgo==0){ location= '$gourl' ; pgo=1; } |
54 | $rmsg .= "document.write(" <style>body{background: |
56 | $rmsg .= "document.write(" <div class= 'tips tips-box' >"; |
57 | $rmsg .= "<div class='title'><p>提示信息</p></div>" ); |
59 | $rmsg .= "document.write(" <div class= 'content' >"); |
61 | $rmsg .= "document.write(" ".str_replace(" "" , "“" ,$msg). "" ); |
63 | $rmsg .= "document.write(" "; |
67 | if ( $gourl != 'javascript:;' && $gourl != '' ) |
69 | $rmsg .= "<a href='{$gourl}' class='go'>点击跳转</a>" ; |
70 | $rmsg .= "<br/></div>" ); |
72 | $rmsg .= "setTimeout('JumpUrl()',$litime);" ; |
76 | $rmsg .= "<br/></div>" ); |
82 | $rmsg .= "<br/><br/></div>" ); |
85 | $msg = $htmlhead.$rmsg.$htmlfoot; |
|
上一篇:织梦程序dede:memberlist显示会员级别
下一篇:织梦相关文章标签likearticle指定栏目ID