Javascript/Javascript+jQuery
[jQuery] 확인 창(confirm), 페이지 이동(location.replace)
자연코딩
2018. 4. 13. 15:34
반응형
$(document).ready(function(){
$('#Btn').click(function() {
var result = confirm('Are you sure you want to do this?');
if(result) {
//yes l
ocation.replace('index.php');
} else {
//no
}
});
});
출처: http://88240.tistory.com/173 [shaking blog]
반응형