| Author |
Copy text from DIV
|
kwon yuu
Greenhorn
Joined: Jul 20, 2010
Posts: 8
|
|
Hi all,
My interface is written using div.
I would like to copy some text from the interface when the application is run.
But I could not able to do this because of div.
Is there a way to copy certain text from div?
Hope someone can give me a guideline.
Thanks.
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9191
|
|
|
I'm not really sure what you are trying to say here. You can easily get the contents of a div (or any other HTML element) by assigning an id to the HTML element and then using getElementById('myId').innerHTML
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
kwon yuu
Greenhorn
Joined: Jul 20, 2010
Posts: 8
|
|
Thanks.
What I meant is I can't select or copy/paste the text that I wrote within div.
I don't want to get all div elements. I don't understand why I can select or do copy/paste after I do my layout with div.
Any idea?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
The use of <div> elements does not prevent copying to the clipboard.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Copy text from DIV
|
|
|