在全屏移动 Safari - iPad 中查看页面源
无论如何,是否可以通过主屏幕应用程序按钮在 iPad 中的移动 Safari 上查看网页的源代码?因为这显然隐藏了地址栏等..
Is there anyway to view the source of a web page on mobile Safari in iPad via the home screen app button? because this obviously hides the address bar etc..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不,您无法在 Mobile Safari 中完全查看源代码。
编辑
您检查过现有的远程调试工具吗?虽然您不一定能够在设备本身上查看全屏 Web 应用程序源,但您可能能够在控制设备上查看源。例如, weinre
No you can't view source in Mobile Safari full-stop.
EDIT
Have you checked out the remote debugging tools that are out there? Whilst you won't necessarily be abel to view full-screen web app source on the device itself, you may then be able to view the source on the control device. For example, weinre
另一个解决方案是,如果您是开发人员,您可以在您的页面上安装 firebug light。
这将使开发人员。更容易...您只需访问(控制台 - HTML - CSS - SCRIPT - DOM)
更多信息:
https: //getfirebug.com/firebuglite#Install
Another solution is that if you are a developer you can install firebug light on your page .
It will make the dev. much easier ... you only have acccess to (CONSOLE - HTML - CSS - SCRIPT - DOM)
More info here :
https://getfirebug.com/firebuglite#Install
是的,您可以,硝基 html 和 WebInspector 都是允许您查看网页的源 html 的应用程序,如果是硝基 html,则可以编辑网页的源 html
Yes you can, nitro html and WebInspector are both apps that allow you to view and in the case of nitro html edit the source html of a webpage
我可以在我的 iPhone 上查看网页的源代码(尽管它看起来很丑)。我在网上找到了一个窍门。很简单。
转到任意网页
点击添加书签
在名称部分添加您喜欢的任何内容
在地址字段中添加以下内容:

javascript:(function()%7Bvar%20a=window.open('about:blank').document;a.write('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead% 3E%3Ctitle%3ESource%20of%20'+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20 /%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement('pre '));b.style.over flow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();
就是这样。现在打开您想要查看源代码的网站。
转到书签并点击您创建的书签。它将在新选项卡中打开源代码。
告诉我它是否对你有用:)
I am able to view the source of a web page (though it looks pretty ugly) on my iphone. I found a tip on the net. Pretty simple.
Go to any webpage
Tap add bookmark
In the name section add anything you like
In the address field add this:

javascript:(function()%7Bvar%20a=window.open('about:blank').document;a.write('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20'+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();
That is it. Now open the site you want to see the source of.
Go to bookmarks and tap the one you created. It will open the source in a new tab.
Tell me if it worked for you :)