Gives an error in the console No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access.
Request itself
$("#id_button").click(function (e) { e.preventDefault(); var UserId = $('input[name=SteamId]').val().trim(); if (!UserId) { alert("Вы забыли указать имя"); return; } console.log("id_button"); $.ajax({ method: "GET", url: "...users/add/?usersid=" + UserId, dataType: "json", success: function (data) { console.log(data.steamid); $("#steam-id-result").text(data.steamid); } }) });
url- Klimenkomud