万能提示页面

提示是项目中最常用到的。一般有弹窗,页面两种大类型。

下面是一个万能提示页面。具体需求,可以具体定制。

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection"content="telephone=no, email=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telphone=no, email=no" />
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link href="/Public/Partner/weixin/css/style.css" type="text/css" rel="stylesheet" />
    <link href="http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="/Public/Partner/weixin/js/jquery-1.9.1.min.js" type="text/javascript"></script>

</head>
<script>
    function closeWeiBrowser(){
        wx.closeWindow();
    }

</script>
<body>
    <div id="wrap">
        <!--content start-->
        <div class="content">
            <div class="perfect-info">

                <div class="perfect-info-cont">
                    <div class="alert-font">
                        <h1>{$alert}</h1>
                    </div>
                    <div class="alert-info-btn">
                        <?php
                            $urlConfig = array(
                                ‘order‘=>array(‘url‘=>‘/partner.php/Home/User/order.html‘,‘btnv‘=>‘我的订单‘),
                                ‘editinfo‘=>array(‘url‘=>‘/partner.php/Home/User/viewInfo.html‘,‘btnv‘=>‘确认提交‘),
                                ‘sendmesg‘=>array(‘url‘=>‘/partner.php/Home/User/systemInfo.html‘,‘btnv‘=>‘确认‘)
                            );
                            $arr = $urlConfig[$_GET[‘config‘]];
                            if($_GET[‘reffer‘]){
                                echo ‘<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>‘;
                                echo ‘<input type="button" onclick = "closeWeiBrowser()" class = "closeweb" value="关闭" />‘;
                            }else{
                                echo ‘<a href = "‘.$arr[‘url‘].‘" style="display:block;text-align: center;line-height: 43px">‘.$arr[‘btnv‘].‘</a>‘;
                            }
                        ?>

                    </div>
                </div>

            </div>
        </div>
        <!--content end-->

    </div>
</body>
</html>

我这里主要是定制了,提示语,跳转URL 和跳转按钮的文字。由于提示语可能存在各种环境中,所以我选择了,页面跳转时候,带在地址栏,配置进来反而不方便。

JS 万能删除提示

$(function(){
    //公共提示删除框
    $(‘.confirm_bin‘).click(function(){
        var r=confirm("确定删除此项?")
        if (r==true)
        {
            window.location.href = $(this).attr(‘href‘);
        }else{
            return false;
        }

    })
})

页面上a标签只要 class = "cinfirm_bin"就好了。

时间: 2024-08-07 20:58:32

万能提示页面的相关文章

ECSHOP信息提示页面的跳转时间设置

ECSHOP商城的很多操作,都会出来一个信息提示页面,告知用户的操作结果,以及请用户选择下一步要去的页面,如果用户不选择,系统将自动跳转到一个页面,那么这个跳转时间在哪控制呢?? 例如,用户登录成功后,会跳出一个信息提示页面,提示您已经登录成功,如果您没选择区哪个页面,隔一段时间它将自动跳转到一个页面. 很多人认为这个时间是在程序文件里设置的,其实不是的. 下面说一下方法 打开 文件 /themes/default/message.dwt 找到下面代码 那个数字 3 就是跳转时间,将它改成别的数

thinkPHP5.0使用form表单提交数据和删除文章,不用TP的提示页面,使用弹出提示信息

form表单提交数据和删除文章时,TP的默认信息提示页面的看起来不是很好看,想要实现弹窗提示怎么做呢? 前端:可以使用前端的一个知识--iframe,iframe元素会创建包含另外一个文档的内联框架:target,规定在何处打开链接文档. 另外想要实现一个好看的方便.能重复使用的弹窗就要开发一个弹窗插件了,这里推荐使用前端的弹窗插件sweetalert.js,为了方便.重复使用我们把它成封装一个函数,页面要引入sweetalert.js的css和js文件 后端:为了方便以后重复使用,先写一个公共

访问网站时提示“页面时到服务器的连接被重置”全面解决办法

今天有个网站很奇怪,访问网站时可以正常打开,到编辑产品页面总显示连接被重置,刷新之后原来可以访问的首页也提示“页面时到服务器的连接被重置”. 过了几分钟,再访问网站,又可以,到编辑产品页面又不行了,如此往复. 网上搜索,无忧主机提示的这个情况和我碰到的有点像,转过来,如下:转自 本文地址:http://www.51php.com/others/13966.html 一般来说,链接被重置,可以分为以下几种情况: 域名解析失效或未解析:服务器出现故障:本地网络故障:程序调用数据库过于频繁于是无忧主机

JSP中,当页面为404或者500时。设置跳转到错误提示页面

最好的就是在WEB.XML文件中配置错误代码的跳转页面,首先建立个 出现500错误的页面,提示出错了,然后再WEB.XML文件中配置,配置如下 一. 通过错误码来配置error-page <error-page> <error-code>404</error-code> <location>/NotFound.jsp</location> </error-page> <error-page> <error-code&

用js实现跳转提示页面

效果图: 网页布局 <p>操作成功</p> <strong>5</strong><span>秒后回到主页</span><a href="javascript:history.back();">返回</a> 任务: 1.打开网页后,如果不做任何操作则返回到一个新的页面 var num=document.getElementsByTagName("strong")[0].in

微信在浏览器打开前的提示页面Android与IOS判断

直接在网上扒一个页面,分分钟搞定!  先看一下效果 这是用微信开发工具打开的样式,直接上完整代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"/> <

Web网站错误提示页面和默认訪问页面设置

1.asp.net 定制简单的错误处理页面 通常web应用程序在公布后.为了给用户一个友好界面和使用体验,都会在发生错误时跳转至一个自己定义的错误页面,而不是asp.net向用户暴露出来的具体的异常列表. 简单的错误处理页面能够通过web.config来设置 <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.

Web站点错误提示页面和默认访问页面设置

1.asp.net 定制简单的错误处理页面 通常web应用程序在发布后,为了给用户一个友好界面和使用体验,都会在错误发生时跳转至一个自定义的错误页面,而不是asp.net向用户暴露出来的详细的异常列表. 简单的错误处理页面可以通过web.config来设置 <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.h

struts2 错误提示页面

以前做的一个网站,最近服务器后台出现一些异常,问题是客户访问一个该网站下不存在的action,为了给客户一个友好的界面提示以及减小服务器端日志文件的内容.就在struts2下进行了如下配置: 在struts.xml里的package下添加: <default-action-ref name="pagenotfound"></default-action-ref>     <action name="pagenotfound">