[英]Login to a webpage from my chrome extension
我想從我的Google chrome擴展程序登錄到網頁。 並且該網頁未在“背景”標簽中運行。 有什么想法嗎?
我的網站使用常規登錄系統。 以下是調用Web服務的代碼。
$(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);
}
如果您詢問如何模擬登錄表單提交,請參見此答案 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.