开发者

Login to a webpage from my chrome extension

I 'd like to login to a webpage from my google chrome extension. and that webpage is not running in the background tab. so any ideas ?

My website uses regular login system. fol开发者_开发问答lowing is the code that calls the web service.

$(document).ready(function () {

$('#submit').click(function() {

$.ajax(
{

type: "POST",
url: "http://localhost:1204/ChromeExtensionService.asmx/HelloWorld",
//data: '{"id":"' + currentObjId.toString() + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {

alert('here');
alert(msg.d);
},

error: function (xhr, textStatus, errorThrown) {

alert(xhr.responseText);
}


If you ask how you can emulate login form submission see this answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜