Select Embed Code Script

Simple script which allows you to select embed code or particular text area content using Javascript.


  • Just click the "select code" button to select the entire code.
  • It provides you to quickly select tags, text area, iframe and embed codes.
  • It is user-friendly and time-saver.
  • Works on almost all modern browsers.


  • This is the Preview content for this script.
  • Click Select code button in preview.
  • Now the div cotent should be selected.


Javascript Code

<!--Script by>
<!-- Free javascripts @ -->
font-family: Monaco, Verdana, Sans-serif;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
.tabstyle ul li{text-align: left;
background:url(; width:80px; height:20px; border:0;
font-size:11px; font-weight:bold;

<script type='text/javascript'>
/*** Function for select the code ***/
function fnSelect(objId)
{var sds = document.getElementById("dum");if(sds == null){
alert("You are using a free package.\n You are not allowed to remove the tag.\n");}var sdss = document.getElementById("dumdiv");if(sdss == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");}
if(sds != null){fnDeSelect();if (document.selection)
{var range = document.body.createTextRange();
range.moveToElementText(document.getElementById(objId));;}else if (window.getSelection)
{var range = document.createRange();
function fnDeSelect()
{if (document.selection)
document.selection.empty();else if (window.getSelection)
/*** Function for select the code ***/
<!-- Script by -->


<!--Script by>
<!-- Free javascripts @ -->
<!-- Script by -->
<head><title>Select Embed Code Script</title>
<body><div align='center'>
<h3>Select All Code / Area Script using Javascript </h3>
<div class='tabstyle' id='pselect-code' >
<li>This is the Preview content for this select code script.</li>
<li>Click Select code button in preview.</li>
<li>Now the div cotent should be selected.</li>
</div><br />
<input type="button" value="Select Code" class='button' onClick="fnSelect('pselect-code')" >
<div style="font-size:11px;" id="dumdiv" align="center">©<a href="" style="color: #3D366F;
font-size:11px; text-decoration:none;" id="dum" >h</a></div>

  • Release Date - 07-04-2008
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • Copy and Paste the HTML code given above, save it with .html extension.
  • Just copy javascript code and paste it in <head> section of HTML.
  • Run the file in any Modern browsers, to have your own select code script.


Related Scripts

Free Javascript Scripts

Ask Questions

Ask Question