6d6f036949b66d0e351747254a5031033ee8a5a7.svn-base 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Alert</title>
  5. <meta name="keywords" content="keyword1,keyword2,keyword3">
  6. <meta name="description" content="强制置顶引用的页面">
  7. <meta name="content-type" content="text/html; charset=UTF-8">
  8. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  9. <style type="text/css">
  10. *{
  11. margin:0px;
  12. padding:0px;
  13. font-size: 12px;
  14. font-family: '微软雅黑';
  15. }
  16. body,html{
  17. width: 100%;
  18. height: 100%;
  19. background-color:inherit;
  20. }
  21. #main{
  22. position: absolute;
  23. margin-left:auto;
  24. margin-right: auto;
  25. top:50%;
  26. left:50%;
  27. background-color: #CDCCD0;
  28. display: inline-block;
  29. }
  30. ._c_bar{
  31. position: absolute;
  32. bottom: 0px;
  33. width: 100%;
  34. height: 30px;
  35. display: inline-block;
  36. }
  37. ._center{
  38. margin: auto;
  39. height: 30px;
  40. text-align: center;
  41. }
  42. ._ok,._cancle{
  43. margin-left: 5px;
  44. margin-right: 5px;
  45. display: inline-block;
  46. color:#1D1D1F;
  47. }
  48. ._ok:hover,._cancle:hover{
  49. background-color: #8E8B8B;
  50. }
  51. </style>
  52. <body>
  53. <div id="main">
  54. <div id="content">
  55. <div></div>
  56. </div>
  57. <div class="_c_bar">
  58. <div class="_center">
  59. <div id="ok" class="_ok">确定</div><div id="cancle" class="_cancle">取消</div>
  60. </div>
  61. </div>
  62. </div>
  63. </body>
  64. <script type="text/javascript">
  65. $(function(){
  66. var height=window.params.height;
  67. var width=window.params.width;
  68. $("#main").css({"margin-top":-height/2+"px",
  69. "margin-left":-width/2+"px",
  70. width:width+"px",
  71. height:height+"px"
  72. });
  73. width=null;
  74. height=null;
  75. var html="";
  76. if(window.params.text!=undefined)
  77. html="<span>"+window.params.text+"</span>"
  78. if(window.params.input!=undefined)
  79. html=html+"<input type='text'/>"
  80. $("#content").append("<div>"+html+"</div>")
  81. html=null;
  82. $("#ok").on("click",function(){
  83. var text=true;
  84. if($("input").size()>0)text=$("input").val();
  85. window.params.OKAY(text);
  86. text=null;
  87. window.params.destory();
  88. window.params=null;
  89. delete window.params;
  90. });
  91. $("#cancle").on("click",function(){
  92. window.params.CANCLE(false);
  93. window.params.destory();
  94. window.params=null;
  95. delete window.params;
  96. });
  97. });
  98. </script>
  99. </head>