Skip to content
Advertisement

Javascript create iFrame dom innerHTML

gives Error: Uncaught TypeError: Cannot read property ‘body’ of undefined

JavaScript

how can i fix this?

Advertisement

Answer

to add content to iframe, you should pass by src attribute, here is an example.

JavaScript

if your content is url, you put it directly into src,like this

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement