zoukankan      html  css  js  c++  java
  • 万能提示页面

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

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

    <!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"就好了。

    onkeyup="if(/D/.test(this.value)){this.value='';}"

    积累知识,分享知识,学习知识。
  • 相关阅读:
    2017-10-11seowhy记录
    2017.8.23创业项目方向
    西安项目分析
    创业方法
    做seowhy官网需要三个人
    2017.8.2 高级长尾编辑技巧
    Golang 任务队列策略 -- 读《JOB QUEUES IN GO》
    Go 到底有没有引用传参(对比 C++ )
    使用xorm工具,根据数据库自动生成 go 代码
    golang的Channel
  • 原文地址:https://www.cnblogs.com/bin-pureLife/p/4268851.html
Copyright © 2011-2022 走看看