Can JavaScript access source code of a [removed] element?

前端 未结 2 1902
你的背包
你的背包 2020-12-06 12:24


Can

2条回答
  •  囚心锁ツ
    2020-12-06 12:38

    No, not directly for fundamental security reasons.

    The fact that you've tagged this with Ajax implies that you're trying to use this as a way to retrieve data. If so, the closest similar approach is JSONP, in which the newly loaded script invokes a method to pass data back to the parent document.

提交回复
热议问题