123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Alert</title>
- <meta name="keywords" content="keyword1,keyword2,keyword3">
- <meta name="description" content="强制置顶引用的页面">
- <meta name="content-type" content="text/html; charset=UTF-8">
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <style type="text/css">
- *{
- margin:0px;
- padding:0px;
- font-size: 12px;
- font-family: '微软雅黑';
- }
- body,html{
- width: 100%;
- height: 100%;
- background-color:inherit;
- }
- #main{
- position: absolute;
- margin-left:auto;
- margin-right: auto;
- top:50%;
- left:50%;
- background-color: #CDCCD0;
- display: inline-block;
-
- }
- ._c_bar{
- position: absolute;
- bottom: 0px;
- width: 100%;
- height: 30px;
- display: inline-block;
- }
- ._center{
- margin: auto;
- height: 30px;
- text-align: center;
- }
- ._ok,._cancle{
- margin-left: 5px;
- margin-right: 5px;
- display: inline-block;
- color:#1D1D1F;
- }
- ._ok:hover,._cancle:hover{
- background-color: #8E8B8B;
- }
-
- </style>
- <body>
- <div id="main">
- <div id="content">
- <div></div>
- </div>
- <div class="_c_bar">
- <div class="_center">
- <div id="ok" class="_ok">确定</div><div id="cancle" class="_cancle">取消</div>
- </div>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- $(function(){
- var height=window.params.height;
- var width=window.params.width;
- $("#main").css({"margin-top":-height/2+"px",
- "margin-left":-width/2+"px",
- width:width+"px",
- height:height+"px"
- });
- width=null;
- height=null;
- var html="";
- if(window.params.text!=undefined)
- html="<span>"+window.params.text+"</span>"
- if(window.params.input!=undefined)
- html=html+"<input type='text'/>"
- $("#content").append("<div>"+html+"</div>")
- html=null;
- $("#ok").on("click",function(){
- var text=true;
- if($("input").size()>0)text=$("input").val();
- window.params.OKAY(text);
- text=null;
- window.params.destory();
- window.params=null;
- delete window.params;
-
-
- });
- $("#cancle").on("click",function(){
- window.params.CANCLE(false);
- window.params.destory();
- window.params=null;
- delete window.params;
- });
-
- });
- </script>
- </head>
-
|