1 개요[ | ]
- jQuery UI confirm dialog
- jQuery UI 확인상자, 확인 다이얼로그
2 소스 코드[ | ]
html
Copy
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script>
$(function() {
$('#dialog').dialog({
autoOpen: false,
resizable: false,
buttons: [
{
text: "OK",
click: function() {
console.log("You pressed OK!");
$(this).dialog("close");
}
},
{
text: "Cancel",
click: function() {
console.log("You pressed Cancel!");
$(this).dialog("close");
}
}
]
});
$('#button_open_dialog').click( function(){
$('#dialog').dialog('open');
});
});
</script>
<button id='button_open_dialog'>확인상자 열기</button>
<div id="dialog" title="확인상자">
<p>아무 것도 하지 않을 것입니다. 동의하십니까?</p>
</div>
3 같이 보기[ | ]
4 참고[ | ]
편집자 Jmnote Jmnote bot 1.209.9.18
로그인하시면 댓글을 쓸 수 있습니다.