Enviado em 13/06/2020 - 14:37h
Cares amigues,OpentextFilee
XMLHttpRequest. Mas ambos resultam em erros.
let fs=Server.CreateObject("Scripting.FileSystemObject") let dados=fs.CreateTextFile("c:\test.txt",true) let arquivo = dados.OpentextFile('GET','registro_usuarios.txt', false);
OpentextFile
ReferenceError: Server is not defined
let dados = new XMLHttpRequest(); let arquivo = dados.open('GET','registro_usuarios.txt', false);
XMLHttpRequest:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/
Enviado em 13/06/2020 - 19:03h
Boa noite.function pegaip01(){ var script=document.createElement('script'); script.src='http://ip-api.com/json/?callback=DADOS_IP&fields=33292287'; document.body.appendChild(script); } //Obs.: É chamada a função DADOS_IP, a qual trata os dados, para o meu propósito. //Ou com o XMLHttpRequest() function pegaip02(){ var url = 'http://ip-api.com/json/?lang=pt-BR&fields=33292287'; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var dados = JSON.parse(xmlhttp.response); DADOS_IP(dados); } } xmlhttp.open("GET", url, true); xmlhttp.send(); }
Enviado em 13/06/2020 - 20:44h
Com JavaScript puro, somente com chamada AJAX ou através de um input do tipo file.Enviado em 13/06/2020 - 21:57h
<!DOCTYPE html> <html lang="pt-BR"> <head> <title>:: PEGAIP::</title> <style> body{margin:0} #titulo {top: 6px;line-height: 0%;font-size: 4vw;color: #fff;text-shadow: 1px 1px 4px #000;} #PRINCIPAL{-webkit-box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.5);box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.5);text-align: center;border-radius: 8px;position:absolute;width:60%;height:auto;overflow-y:auto;overflow-x:auto;left: 20%;top:2.5%;} </style> </head> <body onload="pegaip()"> <div id="PRINCIPAL"> <hr> <h2 id="titulo">★ :: Dados do IP :: ★</h2> <h3 id="saida"></h3> </div> <script> function MOSTRA_DADOS(dados){ document.getElementById('saida').innerHTML="<hr>" for (var z in dados){ document.getElementById('saida').innerHTML += z.toUpperCase()+": "+ dados[z]+"<br>"; } } function pegaip(){ var script=document.createElement('script'); script.src='http://ip-api.com/json/?callback=MOSTRA_DADOS&fields=33292287'; document.body.appendChild(script); } </script> </body> </html>
Enviado em 13/06/2020 - 22:44h
msoliver:Enviado em 13/06/2020 - 23:14h
Boa noite,Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/
Enviado em 14/06/2020 - 11:58h
nao_eh_osimpson:Enviado em 14/06/2020 - 17:53h
Enviado em 14/06/2020 - 18:28h
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Descritores de Arquivos e Swappiness
tux-gpt - Assistente de IA para o Terminal
Instalação e configuração do Chrony
Programa IRPF - Guia de Instalação e Resolução de alguns Problemas
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit
O Que Fazer Após Instalar Ubuntu 25.04
Erro ao atualizar o archlinux [RESOLVIDO] (2)
Erro ao executar o comando para dar um get email (0)