我在javascript/php上有一个web应用程序,我正在制作一个bug查找程序功能,前端的一个用户可以通知bug的按钮。 目前的功能:将console.log的浏览器导入数据
function bug_finder(){
var txt = document.getElementById('bug_txt').value;
if(txt==''){
alert_fail('Um campo ficou vazio!');
return;
}
var DATA = { acao:'bug_finder', txt:txt, log:console.log };
console.log(JSON.stringify(DATA));
$.ajax({
type: "POST",
url: 'dash_acao.php',
timeout:2000,
data: DATA,
success: function(response){
console.log(response);
alert_sucesso('');
},
error: function(response){
alert_fail('');
}
});
}
阿贾克斯将浏览器的PHP文件,我做数据库更新,并在服务器中创建日志文件,所以我可以看看它的内容的console.log。
直到现在我还没有找到一种方法来从浏览器中获取console.log数据,所以我可以操纵。
*“...所以我可以操纵”*。你不能操纵什么? –
可能的重复https://stackoverflow.com/questions/19846078/how-to-read-from-chromes-console-in-javascript – Kdawg