Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

How to get the html from selected item without the mouse?

  • 7 回覆
  • 2 有這個問題
  • 5 次檢視
  • 最近回覆由 Armagedoom

more options

I would like to be able to get the html from a selected item with hotkeys, but I find no way to do so.

So far, I do:

Select the item with a mouse-right click. Then press (Q) which opens the inspect element menu. Now, how could I 'copy the iner html' with hotkeys from there?

Thanks!

I would like to be able to get the html from a selected item with hotkeys, but I find no way to do so. So far, I do: Select the item with a mouse-right click. Then press (Q) which opens the inspect element menu. Now, how could I 'copy the iner html' with hotkeys from there? Thanks!

所有回覆 (7)

more options

Ctrl+C and Ctrl+V ?

more options

Thanks for your reply, but I cant get it to work that way.

When you right-click anything in a website, then press (Q), your selection will still be on the website.

Im asking to copy the html. By using the mouse, you can just click in the white arrow in the grey popup that appears after pressing Q, then click "Copy outer html".

But with hotkeys, I find no way to select anything but the current website selection, so I cant select the html of the element to do a normal control+c / control v

more options

Hmmm,

If you use tab until the focus in inspect element and you press Ctrl+A(select all) then Ctrl+C Ctrl+V

由 Diego Victor 於 修改

more options
more options

Thanks again: After reaching the inspect element by tabbing, control+a, control+c and control+v are not responsive. But that one doesnt deppend on reaching there by tabbing, it is the same as if I press around the area, I cant just control+c the code, I will need to right-click then 'copy outer html' in order to send it to the clipboard.

more options

@AliceWyman Thanks, yes, I read that before asking. It states there that the ways are to right-click and/or reach the context menu as we already discussed. But I was doubting there is no way to programatically (without having to manually right-click anywhere) get the html code?

I guess I will have to right-click then Q then left-click then 'copy iner html' every time :)

more options

I just tested, and in google chrome it works that way, when you inspect an element you can directly ctrl+c and you got the html, saving some valuable seconds and clicks if you are going to do that very often.