简体   繁体   English

Google Chrome扩展程序-如何访问元素并发送HTTP请求?

[英]Google Chrome extension - How to access an element and send a HTTP request?

I haven't managed to find any good resources on Google Chrome extension development. 在Google Chrome扩展程序开发方面,我还没有找到任何好的资源。 Does anyone know of any blogs or resources that walks you through creating extensions? 有谁知道引导您创建扩展程序的博客或资源?

I am trying to create a chrome extension that when I press the extension icon in the toolbar it will look through the webpage, retrieve certain elements and then send a HTTP request to the server as if the javascript that is sending the http request is part of the original page. 我正在尝试创建一个chrome扩展程序,当我按工具栏中的扩展程序图标时,它将浏览网页,检索某些元素,然后向服务器发送HTTP请求,就像发送http请求的javascript是其中的一部分原始页面。

http://code.google.com/chrome/extensions/getstarted.html http://code.google.com/chrome/extensions/getstarted.html

This is the Google documentation that covers almost everything a Chrome extension developer needs to know. 这是Google文档,几乎涵盖了Chrome扩展开发人员需要了解的所有内容。

In particular you'll need to look at content scripts and cross-origin XMLHttpRequests . 特别是,您需要查看内容脚本跨域XMLHttpRequests

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM