I want to get value of hidden element named "login" on http://ts1.travian.ro/
's login page, in order to create a fake login for my Chrome extension.
I would like to do it without jQuery if possible. If not here is my not working example:
var url = 'http://ts1.travian.ro/';
$.ajax({
type: "GET",
dataType: 'html',
url: url,
success: function(data) {
loginValue = $(data).find('input[name=login]').html();
console.log(loginValue);
},
});
I expected to see the login name in the console, but nothing appeared. How can I solve it?