Read IFrame content using JavaScript

后端 未结 4 1228
误落风尘
误落风尘 2020-12-10 19:37

Ok, This is my first time dealing seriously with IFrames and I cant seem to understand a few things:

First the sample code I am testing with:



        
4条回答
  •  旧巷少年郎
    2020-12-10 19:54

    innerHTML does not return the exact content of an element, its a non-standardized method that returns HTML which is equivalent to the real content, and in HTML the equivalent to plain text is

    foo...
    .

    You might have better luck with the innerText property..

提交回复
热议问题