+ 1
Iframes not working properly
Hey. I’m new to coding so it may be simple but when I try using iframes they won’t open the link in the iframe even though I have the location correct (used https://google.com/search for the site) ``` <!DOCTYPE html> <html> <body> <iframe src="google.com" name="iframe_a">width="20" height="200" frameborder="1"></iframe> <p> <a href="https://www.google.com/search" target="iframe_a"> google </a> </p> </body> </html>
7 ответов
+ 4
Not all sites can be used in a iframe. Its headers are blocking it.
0
okay. do you know any sites that would so i can make sure the code works?
0
what is the exact problem there? can you create a fiddle and post the link to it, so we can see and suggest the resolution?
0
lol idk what you mean by fiddle or link. im kinda new to all this
0
https://jsbin.com/diyadehiza/edit?html try modifying this and hit save, then I should be able to see it and work on it
0
https://www.example.com/
"This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission."
List of reserved / example domains:
https://www.iana.org/domains/reserved
0
i did
my goal is to make a simple, working browser. i have tested multiple ways but normally id have to copy each url and edit the code each time. the iframe should help with that if i can get it to work right
https://jsbin.com/diyadehiza/1/edit?html