在全屏移动 Safari - iPad 中查看页面源

发布于 2024-11-29 06:32:42 字数 70 浏览 1 评论 0原文

无论如何,是否可以通过主屏幕应用程序按钮在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

时光倒影 2024-12-06 06:32:42

不,您无法在 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

朱染 2024-12-06 06:32:42

另一个解决方案是,如果您是开发人员,您可以在您的页面上安装 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

破晓 2024-12-06 06:32:42

是的,您可以,硝基 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

誰ツ都不明白 2024-12-06 06:32:42

我可以在我的 iPhone 上查看网页的源代码(尽管它看起来很丑)。我在网上找到了一个窍门。很简单。

  1. 转到任意网页

  2. 点击添加书签

  3. 在名称部分添加您喜欢的任何内容

  4. 在地址字段中添加以下内容:
    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)(); 在此处输入图像描述

  5. 就是这样。现在打开您想要查看源代码的网站。

  6. 转到书签并点击您创建的书签。它将在新选项卡中打开源代码。

在此处输入图像描述

在此输入图像描述
告诉我它是否对你有用:)

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.

  1. Go to any webpage

  2. Tap add bookmark

  3. In the name section add anything you like

  4. 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)(); enter image description here

  5. That is it. Now open the site you want to see the source of.

  6. Go to bookmarks and tap the one you created. It will open the source in a new tab.

enter image description here

enter image description here
Tell me if it worked for you :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文