Script Categories

Page Details >>> Highlighted Text.

Captures any text that has been highlighted with the cursor. In Internet Explorer, it even grabs text highlighted within a text box or textarea.

Try highlighting some of this text.

Selected text:

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var text = "";
function getActiveText(e) {

// Sets text MSIE or Netscape active
// text based on browser, puts text in form
text = (document.all) ? document.selection.createRange().text : document.getSelection();

document.theform.text.value = text;
return true;

document.onmouseup = getActiveText;
if (!document.all) document.captureEvents(Event.MOUSEUP);
//  End -->
<b>Try highlighting some of this text.</b><BR><br>
<form name=theform>
Selected text:  <input type=text name=text value="">

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).