/*** Created by A.J on 2019/10/5.*/$(document).ready(function(){$("#increaselevel").on("click", function(){var xh = parseInt($("#dengjitr").children("tr:last").children(":first").text())+1;$.post("increaselevel", { xh: xh, verification:$("#verification").text()}, function(data){if(data == 'ok'){$("#dengjitr").append('<tr><th scope="row">'+xh+'</th><td><div class="form-group"><input type="text" class="form-control-plaintext px-2 djmiaoshu" value=""></div></td><td><div class="form-group"><input type="text" class="form-control-plaintext px-2 djzhi" value=""></div></td></tr>');}else{$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});});$("#reducelevel").on("click", function(){var xh = parseInt($("#dengjitr").children("tr:last").children(":first").text());$.post("reducelevel", { xh: xh, verification:$("#verification").text()}, function(data){if(data == 'ok'){$("#dengjitr").children("tr:last").remove();}else{$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});});$("#dengjitr").on("change", ".djmiaoshu", function(){var xh = parseInt($(this).parents("tr").children(":first").text());$.post("djmiaoshu", { xh: xh, zhi: $(this).val(), verification:$("#verification").text()}, function(data){if(data != 'ok'){$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});});$("#dengjitr").on("change", ".djzhi", function(){var xh = parseInt($(this).parents("tr").children(":first").text());$.post("djzhi", { xh: xh, zhi: $(this).val(), verification:$("#verification").text()}, function(data){if(data != 'ok'){$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});});});