Accessing relative URL's via “ajax” from “file://” content

前端 未结 2 1523
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 02:55

I\'m putting together some demo pages, and one of the things I want to demonstrate involves fetching HTML fragments dynamically with subsequent processing. Thus I\'ve got si

2条回答
  •  独厮守ぢ
    2020-12-07 03:31

    Had the same issue in Safari+Firefox:

    The alert in code below does not run:

    $.getScript('script.js', function () { alert("Script loaded and executed."); })

    Loading an external file instead of script.js will run.

提交回复
热议问题