English 中文(简体)
通过 Chrome延伸执行员额?
原标题:Performing post through Chrome extension, where does it go?

在我通过我的延期把纽特人带入我的神父时,我想执行以下法典:

    <script>
var formData = new FormData();  
var html = document.innerHTML;
formData.append("time", "12:00:00");  
formData.append("html",document.getElementsByTagName( html )[0].innerHTML);  

var xhr = new XMLHttpRequest();  
xhr.open("POST", "https://www.mywebsite.com/index");  
xhr.send(formData); 
</script>

我的问题是,我不知道这怎么办? 背景 html 明示 我无法理解,甚至在阅读有关建筑的文件之后,它如何运作,谁能帮助我?

最佳回答

该法典应进入背景网页。 为了便于工作,请首先在域许可上添加<代码>https://www.mywebsite.com。 http://code.google.com/chrome/extensions/dev/xhr.html” rel=“nofollow” 。

• 捕获浏览器,但纽扣:

//background.html
chrome.browserAction.onClicked.addListener(function(tab) {
    var formData = new FormData();  
    ...
});

This will work only if you don t have a popup defined.

问题回答

暂无回答




相关问题
Redirect to cache URL in Chrome browser

self.location = cache: + self.location I want to redirect from "[URL]" to "cache:[URL]". I just want this code to work in Chrome browser.

我如何更新/重载 Chrome延?

I m在4号 Chrome(目前为4.0.249.0)中开发一个延伸点,显示用户在地位酒吧中的形象。 Ive设计了一个供用户使用的备选办法网页......

Setting Opacity in CSS For Chrome

I ve tried the following: (this is actually for fancybox, as the overlay does not show in chrome/safari: $("#fancy_overlay").css({<br /> background-color : opts....

Chrome Blocking Javascript, Google Wave, Google Gadgets

Project: Developing a gadget template for Google Wave which will allow my Flash movies to interact with the Wave api. I had to adapt the existing Flex application so that it would work with ...

image height using jquery in chrome problem

$( img ).height() returns 0 in chrome, but it returns the actual height in IE and firefox. Whats the actual method to get the height of the image in chrome?

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Table cells bad rendering with Google Chrome/Webkit

On the following code, COL1A and COL3A are not 50% height with Chrome or Webkit. It works fine with IE7 and Firefox. <table border="1"> <tr> <td height="100%">COL 1A</td>...

热门标签