/    Sign up×
Community /Pin to ProfileBookmark

Select all And Copy

Hi!

I’m looking for a script, or just the possibility to make a button that first

Select the Whole Page (Select All)

Copy to Clipboard ( Copy all previously “Select All” Text to Clipboard )

I found many scripts that just copy a text area, or part of the document. I know that the simple way is click with the right button…then select all ..copy.

I would like to build one button for both actions.

Any suggestion?

Thx!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@felgallFeb 04.2008 — A web page has no way of telling if the operating system has a clipboard except for Internet Explorer as all other browsers can run on a variety of devices that don't have one. There is therefore no JavaScript command for accessing the clipboard that may or may not exist. There is a command that works with Internet Explorer but it will not work for any other browser.

The following statement will copy the content of the page to the clipboard in IE.

document.body.innerHTML.execCommand("Copy");
Copy linkTweet thisAlerts:
@hpunaroauthorFeb 04.2008 — and just to clariify, I should insert this command as a hyperlink?

I tried here w/o success.

Thanks for your help.
×

Success!

Help @hpunaro spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...