Is it possible to implement a Firebug-like "inspect element" DOM element highlighter with client-side JavaScript?
Is it possible to show an arbitrary web page (call it the target web page) in an iframe
element of a host webpage, and let the use select and highlight a div
box in the target web page (in the iframe) and return information about that selection (开发者_开发知识库e.g. the xpath to that node) to the host web page?
This is essentially Firebug's inspect-element feature, but implemented with javascript and using an iframe to hold the webpage that is being inspected.
You should check out firebug lite, as this may be exactly what you're looking for
Edit: just to clarify, I'm not talking about using Firebug Lite as an extension, but as in included js, as is mentioned near the bottom of the page I referenced. Like this:
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>
精彩评论