perform
function deletePage() {
    var reply = window.confirm("確定要刪除?刪除後將無法復原");
    if(reply) {
        $.ajax({
            type : 'DELETE',
            url : location.pathname,
            error : function() {
                alert("error");
            },
            success: function() {
                alert("頁面已被刪除");
                location.href='/mypage';
            }
        })
    }
}