에서
인사 당신은 오버레이하고 사용자에게 표시 할 정보를 포함하는 대화 상자가 될 것 사업부를 작성해야합니다. 이벤트가 트리거되면 jquery.show()를 사용하여 오버레이와 대화 상자를 표시하십시오.
당신은 이런 식으로 뭔가를 시도 할 수 :
이
<html>
<head>
<style type="text/css">
#fullscreen { display:none; position: fixed; z-index:500; min-height: 100%; min-width: 1024px; width: 100%; height: auto; background-color: #565656; top:0; left:0px; margin:0; padding:0; opacity: .5;-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=50)"; filter: alpha(opacity=50);}
#myDialog {display:none;}
</style>
</head>
<body>
<div id="fullscreen"></div>
<div id="myDialog title="My Dialog Title" ></div>
</body>
<script type="text/javascript>
$(document).ready(function() {
//When the user attempts to navigate away from the current page...
$(window).unload(function() {
$('fullscreen').show();
$(function() {
$("#myDialog ").dialog({
resizable: false,
closeOnEscape: false,
width: 660,
modal: true,
open: function (event, ui) {
//hide close button.
$(this).parent().children().children('.ui-dialog-titlebar-close').hide();
},
buttons: {
"OK": function() {
$(this).dialog("close");
$("fullscreen").hide();
window.location = "http://mypage.com";
},
"No, thanks": function() {
$(this).dialog("close");
$("fullscreen").hide();
}
}
});
});
});
});
});
</script>
</html>
그런 다음 필요한 모든 행동을한다. jQuery의 이러한 측면에 익숙하지 않은 경우 대화 상자의 설명서를 살펴 보는 것이 좋습니다. http://jqueryui.com/dialog/
방법을 찾으면 알려주세요. ^^하지만 표준 경고창이 없으면 불가능하다고 생각합니다. 경고를 대체 할 수는 있지만 무언가를 추가 할 수는 있습니다 ... – Petra