[removed] Let user select an HTML element like Firebug?

后端 未结 10 943
醉话见心
醉话见心 2020-11-30 17:55

I want to write a browser (Chrome/FF) extension that needs to select an element on a web page. I would like it to behave like Firebug\'s element inspector does. You click

10条回答
  •  抹茶落季
    2020-11-30 18:52

    There was a similar question asked on Stackoverflow and it had lots of good answers: Does anyone know a DOM inspector javascript library or plugin?

    For those who are looking for a quick and dirty solution:

    http://userscripts.org/scripts/review/3006 is the easiest. Just put the code within tags and you are good to go.

    https://github.com/josscrowcroft/Simple-JavaScript-DOM-Inspector/blob/master/inspector.js is slightly better and still very easy to integrate in.

    For a more sophisticated element inspector, you might want to check out the SelectorGadget as pointed by Udi. The inspector selection code is in http://www.selectorgadget.com/stable/lib/interface.js

提交回复
热议问题