JQuery greys the background as it pops up the dazzle dialog

  • 2020-03-30 03:03:52
  • OfStack

During this period of development, I used JQuery to pop up the dazzling dialog box, and the background became gray. I'd like to share with you.

First look at the renderings:
< img SRC = "border = 0 / / files.jb51.net/file_images/article/201405/201405221712122.gif? 2014422171231 ">  
The code is as follows:
<html xmlns="http://www.w3.org/1999/xhtml"> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<script src="js/jquery-1.9.1.js"></script> 
<script src="js/jquery-ui.js"></script> 
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css"> 
<title>JQuery It pops up, and the background turns gray </title> 
<script type="text/javascript"> 
$(document).ready(function(e) { 
$( "#reviews" ).bind('click',function(event) { 
$( "#checkandPass" ).dialog({ 
autoOpen: true, 
width: 765 , 
show: "blind", 
hide: "explode", 
modal: true,//Set the background gray
$( "#checkandPass" ).dialog( "open" ); 
return true; 

<input type="button"id="reviews"value="Click me"/> 
<div id="checkandPass" title=" Audit opinion " style="display: none;"> 
<form id="passideas_true" method="post" enctype="multipart/form-data" > 
<textarea style="width:100%;height:90%;min-height: 100px;"></textarea> 
<div style="margin-top: 20px;text-align: center;"> 
<button style="height:30px;width:80px;" type="button" id="upfpass_true" > determine </button> 
<button style="height:30px;width:80px;" id="sb"> cancel </button> 

It's guaranteed to be the effect you want.

Related articles: