XMLHttpRequest Origin null is not allowed Access-Control-Allow-Origin for file:/// to file:/// (Serverless)

前端 未结 9 898
醉梦人生
醉梦人生 2020-11-22 03:30

I\'m trying to create a website that can be downloaded and run locally by launching its index file.

All the files are local, no resources are used online.

Wh

9条回答
  •  無奈伤痛
    2020-11-22 04:13

    use the 'web server for chrome app'. (you actually have it on your pc, wether you know or not. just search it in cortana!). open it and click 'choose file' choose the folder with your file in it. do not actually select your file. select your files folder then click on the link(s) under the 'choose folder' button.

    if it doesnt take you to the file, then add the name of the file to the urs. like this:

       https://127.0.0.1:8887/fileName.txt
    

    link to web server for chrome: click me

提交回复
热议问题