Commit 3cb2d061 authored by nanahira's avatar nanahira

add confirm

parent 7bb50a28
...@@ -94,9 +94,11 @@ function loadreplays() { ...@@ -94,9 +94,11 @@ function loadreplays() {
} }
function clearreplays() { function clearreplays() {
if (confirm("确实要清空记录吗?")) {
var url=$("#http").val() + "://" + $("#ip").val() + ":" + $("#port").val() + "/api/clearlog?callback=?"+ ($("#password").val() ? "&pass="+$("#password").val() : ""); var url=$("#http").val() + "://" + $("#ip").val() + ":" + $("#port").val() + "/api/clearlog?callback=?"+ ($("#password").val() ? "&pass="+$("#password").val() : "");
$.getJSON(url, listreplay); $.getJSON(url, listreplay);
$("#open_button").removeClass("btn-success"); $("#open_button").removeClass("btn-success");
}
} }
function listreplay(data) { function listreplay(data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment