简体   繁体   中英

Google Apps Script - How can i get the content of a page?

When i try to use the XMLHttpRequest() function in a google script, i get an error telling me the element is undefined. Is there another way to get the content of a page using google script.

Any help would be much appreciated.

This is limited to avoid the ability to redirect people visiting a publicly (and trusted) document which would fetch data accessible on your browser (using your login sessions and etc).

Make sure you set the CORS headers as specified in the W3 specification to allow external services to query your request handler.

See the page here for more limitations: https://developers.google.com/apps-script/guides/html/restrictions#xmlhttprequests_xhr

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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