LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » HTML-CSS-PHP-JavaScript / JavaScript Codes » How To Copy Text From A Div And Paste It Into A TextArea Using JavaScript?

How To Copy Text From A Div And Paste It Into A TextArea Using JavaScript?

How To Copy All Text From A DIV And Paste It Into A TextArea Via Single, Double Click On Text Or HTML Button On DIV Using JavaScript With Full Customization On A Web-Page Easily?

ToDay The Question Is That How To Copy All Text From A DIV And Paste It Into A TextArea Via Single, Double Click On Text Or HTML Button On DIV Using JavaScript With Full Customization On A Web-Page Easily? You Have Ever Experienced Some Code Like This On Any Other Blog/Site And Want It To Your Blog/Site But They Are Not Sharing, Don’t Be Down Because Here It Is.

Actually It’s Not In General Use But Codes Are Codes. It Will Help You To Get New Ideas And Also Help Your In Your Any Project. So Here Is The Code That Is A Little JavaScript Of One Line Only, There Is Also HTML CSS But For Styling And Viewings This, It’s Quick To Load And Better Is Use, The Real Work Of This Code Is That When You Click On The First DIV, The All Data Will Be Copied And Pasted Into A New TexaArea Box. You Can Move DIV And TexaArea Anywhere Easily.

You Can Add Unlimited DIV And TexaArea Or Even As Your Desire. There Are Many Use Of This Code But It Depends On Your Desire. There Are Many Features Like You Can Copy/Paste Data With One Click On DIV, Double Click On DIV Or One Click On A HTML 3D Button. Without Any More Preface, Just Jump To The Code By Going Through The Features List That Will Help You A Lot And Describe You The Real Function Of This Code Briefly And Easily.


Features:

1.) It Will Copy All Text From Div And Paste It Into A TextArea.
2.) You Can Do It Via Clicking On DIV Text.
3.) You Can Copy The Text Via Single Click Or Double Click r HTMl 3D ButtonAs Your Desire.
4.) You Can Customize It Fully Easily.
5.) Short JavaScript Code Without J-Query.
6.) Work Even With IE6+. (Cross Browser)
7.) You Can Add In Blog Gadget Or In Post Also.
8.) Awesome And Stylish Script.
9.) There Are Many Ways To Use It.
10.) Quick To Load And Better In Work.

How To Add In Blogspot?

1.) Go To Your www.blogger.com
2.) Open Your Desire Blog.
3.) Go To “Layout”.
4.) Click “Add A Gadget” Where You Want To Add It.
5.) Now Scroll To “HTML-JAVASCRIPT”
6.) Click “+” Icon To Add It.
7.) Now Copy The Below Code And Paste It To There.
8.) Leave The Title Empty.
9.) Click Save, Now You Are Done.

How To Add In Website?

1.) Just Go To Your HTML File.
2.) Now Copy The Below Code And Paste It Between <body> </body>.
3.) Save It, Now You Are Done.

<script language="javascript" type="text/javascript"> 
function copyText() {
var output = document.getElementById("main-copy").innerHTML;
document.getElementById("output").value = output;
}
</script>
<style type="text/css">
#main-copy {
border: solid 1px black;
height: 110px;
width: 341px;
cursor: pointer;

}
#output{
border: solid 1px black; 
}
</style>
<div id="main-copy" onDblClick="copyText()">Double Click On Me To Copy Me And Paste Me In The Below TexArea.</div>
<textarea id="output" cols="40" rows="7" ></textarea>

Customization:

1.) Change Red Text With Your Desired CSS to Customized The Boxes.
2.) Change Blue Text With Your Data That Will Be Copied To TexaArea.
3.) Change onDblClick To onClick To Copy The Data With One Click Or Leave It To Copy The Data With Double Click.
4.) Feel Free To Ask For HTML 3D Button.
5.) Save And Done.

You Like It, Please Share This Recipe With Your Friends Using...

2 Responses to “How To Copy Text From A Div And Paste It Into A TextArea Using JavaScript?”

  1. Anonymous says:

    Please give jQuery Google+ Followers Box Pop Up For Blogger like this :
    THIS IS A DEMO SITE

    http://quiz-baba.blogspot.com/

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>