- <script type="Text/javascript" src="<ww:url value= '/js/jquery-1.8.3.min.js '/>" Language="javascript"></script>
- <script type="Text/javascript">
- $ (function () {
- var query = location.search;
- var equal_index = query.lastindexof ("=");
- var result_index = query.indexof ("result");
- var submit_index = query.indexof ("submit");
- if (result_index! =-1) {
- if (query.substring (Equal_index + 1) = = ' success ') {
- $ ("#msg"). Text (' Save succeeded ');
- Pupopen ();
- }
- }
- if (submit_index! =-1) {
- if (query.substring (Equal_index + 1) = = ' success ') {
- $ ("#msg"). Text (' escalation successful ');
- Pupopen ();
- }
- }
- });
- function Pupopen () {
- $ ("#bg"). CSS ("Display", "block");
- $ ("#popbox"). CSS ("Display", "block");
- $ (window). Scroll (function () {$ (window). scrolltop (0);}); /Disable Browser scroll screen
- }
- function Pupclose () {
- $ ("#bg"). CSS ("display", "none");
- $ ("#popbox"). CSS ("display", "none");
- $ (window). Unbind ("scroll");//Restore Browser scroll screen
- }
- </Script>
- <style type="Text/css">
- body{margin:0px;}
- #bg {width:100%;height:100%;top:0px;left:0px;position:absolute;filter:alpha (opacity=); opacity:0.5; Background: #000000; Display:none;}
- #popbox {position:absolute;width:300px; height:200px; left:50%; top:50%; margin:-200px 0 0-200px; display:none; Background: #FFFFFF;}
- </style>
- <body>
- Finally fix this effect, ie and ff,op can all ~
- First say the principle: two layers, a height and width are 100%, the other is you want to pop up the specific content of the window, semi-transparent in IE with Filter:alpha (opacity=60), in non-IE with opacity:0.60;
- </br>
- <div id= "BG" ></div>
- <div id= "PopBox" >< Center style= "margin-top:70px;" ><img src= "<ww:url value= '/image/correct.jpg '/>" /> < span class= "tag" ><span id= "MSG" ></span> </center>
- <br/><br/><br/>
- <img src="<ww:url value= '/image/ok.png '/>" width= "+" height= " onclick="Pupclose ()" style="Cursor:pointer"/>
- </div>
- </body>
CSS Popup Background Translucent window