Get innerhtml from external page with Javascript

前端 未结 6 580
离开以前
离开以前 2021-02-04 17:47

I\'m trying to get innerHTML of a DIV that is located on external page. It is possible to do this using this kind javascript code?

    

        
6条回答
  •  一个人的身影
    2021-02-04 18:04

    You cannot get the html from an external html due to security issues.

    You can get the html only from a frame located on the same domain.

提交回复
热议问题