Hello, We Changed Our Cloth, How It Is Looking? Leave Your Feedback At Our Page.

Saturday, December 22, 2012

How To Highlight/Select All DIV/Span Content Using JavaScript?

This Article Was Live On: Saturday, December 22, 2012 And Till Now Have18 comments.
How To Highlight/Select All DIV/Span Content Using JavaScript?

The question is that "How To Highlight All Or Select All DIV Or Span Text Or Content On Mouse Click On Button Using JavaScript?" Many blogger, coder want this awesome code to give his visitor a relax to his finger by giving him button to highlight all content using one click instead of pressing the mouse button and scrolling right to left or left to right.By this code you can also provide visitor hardware(Mouse0 to a relax. It is also best for Coding Providing Site/Blog to make it awesome and stylish. It has also unlimited features, First see the features and DEMO on this page before proceeding, Just scroll down and see the DEMO.


1.) It Will Highlight All Or Select All DIV/Span/Textarea Content Using Button.
2.) Pure JavaScript Code.
3.) Easy To Use And Easy To Use.
4.) Quick, Quick, Quick To Load.
5.) 813 bytes Only JavaScript File Size.
6.) You Can Add Unlimited DIV Even On A Single Page/Post.
7.) You Can Also Add CSS Style On ID's.
8.) It Will Also Remove Highlight All Or De-Select All DIV/Span/Textarea Content Also Using Button.
9.) Compatible With IE-5+ And All Other Browsers.
10.) Short And Simple Code With Easy Customization.

How To Add In Blogspot's Post?

1.) Go To Your
2.) Open Your Desire Blog.
3.) Go To "Template".
4.) Click "Edit HTML".
5.) Now Find </head> In Template.
6.) Now Copy The Below Code And Paste It Before </head>.
<script type='text/javascript'>
// EXE-Select All - A Full Featured, Light-Weight, Highlight All DIV Content Script.
// Copyright (c) 2012 EXEIdeas International -
// View Tuotorial At:
function fnSelect(objId) {
if (document.selection) {
var range = document.body.createTextRange();
else if (window.getSelection) {
var range = document.createRange();
function fnDeSelect() {
if (document.selection) document.selection.empty();
else if (window.getSelection)
// This Is A Copyrighted "EXE-Select All" Code, Don't Try To Theft It Otherwise...!!!
7.) Click Save, Now You Are Done.
8.) Now Add A New Blog Post And Copy The Below Code There.
9.) Customize It And Published Your Post.

How To Add In Website's Page?

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.

<div id="execodediv0" >
<center> <input type="submit" title="Highlight The Code" onclick="javascript:fnSelect('execodediv0');" value="Select All The Code" /> <input type="submit" title="Remove The Highlighting" onclick="javascript:fnDeSelect();" value="DeSelect All The Code" /> </center>


1.) Change +++YOUR ENCODED HTML CODE HERE+++ With Your DIV Content.
2.) For New Div On The Same Page, Add This Code Again But Change execodediv0 To execodediv1 Or Respectively Increasing...
3.) Save And Done.

You Like It, Please Share This Article Using...

Don't Forget To Read This Also...


  1. Really great job hassan. I am interested to using it in my blog.

  2. Java script plays a very important role in various aspects of the website and blogs. I really appreciate the mention of the Java script coding for highlighting and spamming the content in both website and blog and also providing information on how to use them in coding. It's a very impressive and informative post.

  3. When I Am Using It INto My Blog Then Both Buttons Are Working But There Is No Border Box Around The Code..

    1. Add Styles To #execodediv0 With Borders And Whatever You Want.

  4. This comment has been removed by the author.

    1. It Just Highlights All The Text In DIV Box, You Have To Manually Click COPY To Copy The Text...

  5. hey i can't understand how to use it........
    plz plz help Me..........

    1. What The Problem And Error You Are Experiencing While Using This And What You Want?

  6. Hasan bro what is the conditional tag to stop appearing in-text into this div content just like exeideas?

    1. Are You Asking About To Stop Appearing Infolinks InText Ads To Stop Appearing On DIV Content?

    2. Currently I Am Not Using Any Tags But You Can Read The Official Docomentation From Infolink At There Support Post Named As How do I restrict InText ads from certain areas?.

  7. It's 1000% Working Fine Thank You Sir.....


Speak Your Mind:

Please Read The Rules Before Commenting:-

1.) Your feedback is always appreciated. We will try to reply to your queries as soon as time allows.
2.) Make sure to click the "Notify me" link below the comment to be notified of follow up comments and replies.
3.) Please "Do Not Spam".
4.) Please "Do Not Add Links" to the body of your comment as they will not be published. If the quires contain link then never add HTML tag to it.
5.) Only "English" comments shall be approved and answered.
6.) If you have a problem check first the comments, maybe you will find the solution there.
7.) Your comments must contain 100+ characters to remain accepted.
8.) Never Use Keywords In The Name Section Otherwise Your Comment Will Be Deleted.
9.) All comment will be deleted if it will not fulfil the requirements.