Closed hotsixman closed 1 year ago
Describe the bug
jQuery works, but this code doesn't work document.querySelector('button').addEventListener('click', function(){ $.ajax({ type: "GET", url: "https://google.com", success: function(data){ alert(data); }, error: function(request, status, error){ alert("code:" + request.status + "\n" + "message:" + request.responseText + "\n" + "error:" + error);})})
document.querySelector('button').addEventListener('click', function(){ $.ajax({ type: "GET", url: "https://google.com", success: function(data){ alert(data); }, error: function(request, status, error){ alert("code:" + request.status + "\n" + "message:" + request.responseText + "\n" + "error:" + error);})})
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.
Describe the bug
jQuery works, but this code doesn't work
document.querySelector('button').addEventListener('click', function(){ $.ajax({ type: "GET", url: "https://google.com", success: function(data){ alert(data); }, error: function(request, status, error){ alert("code:" + request.status + "\n" + "message:" + request.responseText + "\n" + "error:" + error);})})
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.