Skip to content
Advertisement

Is an empty iframe src valid?

I want an iframe to initially have src as blank and then once the page loads; call a JS function and then set the src value to an actual one..

So is <iframe src="#" /> valid OR do I need to use something else like javascript:;, etc

Advertisement

Answer

just <iframe src='about:blank'></iframe>

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