jQuery: HTML is not updated after manipulating

后端 未结 1 1385
陌清茗
陌清茗 2021-01-16 10:57

I am loading external content via the jQuery method load and manipulate the src attribute of the img elements previously loaded as follows:

<
相关标签:
1条回答
  • 2021-01-16 11:28

    The 'Origin null is not allowed by Access-Control-Allow-Origin.' is happening because you are opening the page locally on your machine and not via a web address. Chrome is checking you are not making cross-domain calls and has decided it can't verify your calls because they are local. This may be a clue as to why the images aren't loading - the relative path you've given may be causing issues. If you save the HTML that shows in jQuery to a new flat HTML file and open it in the same location, do the images show?

    0 讨论(0)
提交回复
热议问题