function del( basicToolTypeOld, basicToolIdOld, platformNameOld, userNameOld ) { if (!confirm("确认删除吗")) { return } const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener('readystatechange', function () { if (this.readyState === this.DONE) { alert(this.responseText) window.location = "" } }); xhr.open('DELETE', `http://${SERVER_IP}:${SERVER_PORT}/api/user?basic_tool_type=${basicToolTypeOld}&basic_tool_id=${basicToolIdOld}&platform_name=${platformNameOld}&user_name=${userNameOld}`); xhr.send(); }