[removed] how to fetch the content of a web page

前端 未结 4 2036
傲寒
傲寒 2021-02-06 07:38

In JS is it possible to fetch the content of a web page assigning it to a variable? For example, why the following toy code does not work?

var req = new XMLHttp         


        
4条回答
  •  南旧
    南旧 (楼主)
    2021-02-06 08:20

    For security reasons, you cannot use AJAX to send a request to a different domain.

提交回复
热议问题