简体   繁体   English

为什么iframe中的href链接无法在ios设备上运行?

[英]Why href link inside an Iframe is not working on ios device?

I am developing a web app for an iframe, but in the iframe when clicking on the hyperlink (href) it shows a blank page on ios device. 我正在为iframe开发Web应用程序,但是在iframe中,单击超链接(href)时,它在ios设备上显示空白页。 Bytheway it is working on all other devices except iPhone 顺便说一下,它可以在iPhone以外的所有其他设备上使用

I tried to find out everything on the internet, there is no relevant answer to my problem 我试图找出互联网上的所有内容,但没有相关问题的答案

When I click on the href link it should redirect another webpage of the same domain 当我单击href链接时,它应该重定向同一域的另一个网页

Try this way 试试这个

 <html> <style> body {width: 100%; height: 100%; margin: 0; padding: 0} </style> <body> <center><iframe src="http://example.com" style="width:100%; height:100%;" frameborder="0"></iframe></center> </body> </html> 

href is for links not for iframes, also make sure your links are not using target="_blank", your question could be more clear if you post the code, so we could understand what you really need href是针对非iframe的链接,还请确保您的链接未使用target =“ _ blank”,如果您发布代码,则您的问题可能会更加清楚,因此我们可以理解您的真正需求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM