這段時間在做開發時,用到了JQuery彈出炫麗對話框,背景變灰色。特地和大家分享分享。 
先看效果圖: 
復制代碼 代碼如下:
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<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 type="text/css" href="css/jquery-ui.css"> 
<title>JQuery彈出框,背景變灰色</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,//設置背景灰的 
}); 
$( "#checkandPass" ).dialog( "open" ); 
return true; 
}); 
}); 
</script> 
</head> 
<body> 
<div> 
<input type="button"id="reviews"value="Click me"/> 
</div> 
<div enctype="multipart/form-data" > 
<div> 
<textarea></textarea> 
</div> 
<div> 
<button type="button" >確定</button> 
<button>取消</button> 
</div> 
</form> 
</div> 
</body> 
</html> 
新聞熱點
疑難解答
圖片精選