`
天梯梦
  • 浏览: 13630255 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论

手机firebug查看网页代码 How to View Website Source Codes on iPad / iPhone

阅读更多

You’re using your iPad to browse the Web and you’re curious to view the source of a webpage but don’t have the options to do so. The next thing you know, you’re swapping back to your Mac or PC to open up the same website to check the Page Source. Now if that isn’t called a hassle, I don’t know what is.

 

To make things easier for all iPad and iPhone users out there, here’s a trick to allow you to view the source of a webpage straight from your mobile device. Take note that the code you will be using will redirect you to the creator’s website, where the source is presented in highlighted syntax and clickable URL for easier reading.

 

Set up ‘View Source’ Bookmark

  1. To get started, open your mobile Safari on your Apple device and bookmark the page you are reading by clicking on the bookmark button. Instead of the page name, name it ‘View Source’ and then click ‘Save’.
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
     
  2. Open this bookmarklet javascript, select all and copy the script.
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone

    代码:

    javascript:(function(){
        var w = window.open('about:blank'),
            d = w.document;
        d.write('');
        d.close();
        var f = d.createElement('form');
            f.setAttribute('method','post');
            f.setAttribute('action','https://ole.michelsen.dk/viewsource/?uri='+encodeURIComponent(location.href));
        var i = d.createElement('input');
            i.setAttribute('type','hidden');
            i.setAttribute('name','DOM');
            i.setAttribute('value',encodeURIComponent(document.documentElement.innerHTML));
        d.body.appendChild(f).appendChild(i);
        f.submit();
    })();

     

  3. Tap on the bookmark icon at the top left part of your mobile Safari browser, and tap on ‘Edit’
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
     
  4. Tap on the ‘View Source’ bookmark you created in step 1.
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
     
  5. Now paste the bookmarklet javascript you copied in step 2 into the URL bar and tap ‘Done’.
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
    手机查看网页代码 How to View Website Source Codes on iPad / iPhone
     

View Source On Safari on iPad and iPhone

Now that you have created a new bookmark called ‘View Source’, to view source of any webpage, open any site from your Safari browser, tap on the bookmark icon and then tap on the ‘View Source’ bookmark.

手机查看网页代码 How to View Website Source Codes on iPad / iPhone
手机查看网页代码 How to View Website Source Codes on iPad / iPhone
 

This bookmark shortcut will send a request to the creator’s server for processing and then open a new browser tab for you to view the source in highlighted syntax.

手机查看网页代码 How to View Website Source Codes on iPad / iPhone
手机查看网页代码 How to View Website Source Codes on iPad / iPhone
 

Conclusion

This method to ‘view source’ is not similar to web developer tools where you have it as an extension to your browser, but creating this bookmark is to save a shortcut to the creator’s website where you can view any website’s source with highlighted syntax.

源自:http://www.hongkiat.com/blog/view-source-codes-in-ipad-iphone/

 

同样的方法,你也可以使用firebug的js

javascript:(function(){ var fb = document.createElement('script');
fb.type = 'text/javascript'; fb.src = 'https://getfirebug.com/firebug-lite.js#startOpened';
document.getElementsByTagName('body')[0].appendChild(fb); })();

 

firebug_lite_ipad firebug_lite_iphone

 

源自: https://getfirebug.com/firebuglite_mobile

 

原文/转自: 手机查看网页代码 How to View Website Source Codes on iPad / iPhone

 

 

 

 

 

 

 

 

 

 

 

 

分享到:
评论

相关推荐

    firebug-lite源代码

    firebug源代码包含,嘿嘿 博文链接:https://xinlingwuyu.iteye.com/blog/219796

    类似于firebug的网页开发工具,适用于IE版本,遨游

    类似于firebug的网页开发工具,适用于IE版本,遨游 Firebug集成到傲游浏览器中,将提供一个良好的网页开发工具,当您浏览任何网页时,可以直接编辑,调试和监测网页中的CSS,HTML和JavaScript元素。(Firebug ...

    firebug1.12-firebug1.11-firebug1.10-firebug1.9-firebug1.8-firebug1.7

    firebug1.12 firebug1.11 firebug1.10 firebug1.9 firebug1.8 firebug1.7

    Firebug | 火狐调试工具 V2.0.19 正式版

    最近在做web编程,想下Firebug,但是一直连接不上官网。这个是官方最新版本! 百度了整个网络,好不容易找到了,原版地址:http://www.cosoft.cc/pcsoft/web/Firebug.html Firebug 是网页浏览器 Mozilla Firefox 的...

    firebug源代码

    firebug的源码,功能很强大,代码很齐全,欢迎共同研究

    firefox插件firebug

    Firebug是firefox的一个插件,Firebug 和 firefox 整合在一起,使你浏览网页时手边有了一套强大的网页开发工具。 你可以编辑、调试和监控任何网页上的 CSS、HTML 和 Javascript。而且可以在线的时候修改dom非常弹大...

    Packtpub.Instant.Firebug.Starter.Jan.2013.pdf

    Instant Firebug Starter is a practical, hands-on guide that provides you with a number of clear step-by-step exercises to help you take advantage of the full power that Firebug offers. This book will ...

    fixfox经典插件firebug源码

    fixfox经典插件firebug源码,学习用。

    使用FireFox firebug 调试网页的方法.doc

    使用FireFox firebug 调试网页的方法.doc

    Firebug 1.5: Editing, Debugging, and Monitoring Web Pages

    The book begins with the steps to install Firebug, followed by an overview of the Firebug window.... This will be followed by a discussion on how to develop our own Firebug extension.

    WEB开发好助手FireBug

    Firebug是Firefox下的一款开发类插件,现属于Firefox的五星级强力推荐插件之一。它集HTML查看和编辑、Javascript控制台、网络状况监视器于一体,是开发JavaScript、CSS、HTML和Ajax的得力助手。Firebug如同一把精巧...

    最新版fireBug插件

    最新版fireBug插件,安装后即可使用对js代码调试

    firebug-2.0.16-是firefox下的一个扩展,能够调试所有网站语言

    Firebug是网页浏览器 Mozilla Firefox 下的一款开发类扩展,现属于Firefox的五星级强力推荐扩展之一。它集HTML查看和编辑、Javascript控制台、网络状况监视器于一体,是开发JavaScript、CSS、HTML和Ajax的得力助手。...

    firebug各个版本安装包

    firebug各个版本安装包,从firebug-1.7.3到firebug-1.12.7-fx.xpi。

    最新firebug,好东西,最新整理

    最新firebug,好东西,最新整理,最新firebug,好东西,最新整理最新firebug,好东西,最新整理

    Firebug v2.0.18.zip

    Firebug是网页浏览器Mozilla Firefox下的一款开发类插件,现属于Firefox的五星级强力推荐插件之一。它集HTML查看和编辑、Javascript控制台、网络状况监视器于一体,是开发JavaScript、CSS、HTML和Ajax的得力助手。 ...

    火狐30及FireBug2.0

    火狐30,FireBug2.0 ,web开发利器,下载后直接解压,先安装火狐浏览器,然后点击工具---附加组件,然后将FireBug的文件直接拖到窗口内,即可完成安装,使用时,点击浏览器地址栏后面的虫子图标,即可进入firebug...

    firefox 及 firebug

    1、Firefox火狐浏览器最新官方版下载 版本:41.0.2.5765 大小:43.1M 更新:2015-10-16 环境:WinXP/Win2003/Vista/Win7/Win8 2、Firebug 2.0.12

    firebug2.0.7

    firebug2.0.7

    httpwatch与firebug.

    httpwatch与firebug.

Global site tag (gtag.js) - Google Analytics