Viewing ./search2.html Filesize: 1.42Kb
<html>
<head>
<script type="text/javascript">
function getSelectedText() {
    if (window.getSelection) {
        // This technique is the most likely to be standardized.
        // getSelection() returns a Selection object, which we do not document.
           return window.getSelection().toString();
    }
    else if (document.getSelection) {
        // This is an older, simpler technique that returns a string
        return document.getSelection();
    }
    else if (document.selection) {
        // This is the IE-specific technique.
        // We do not document the IE selection property or TextRange objects.
        return document.selection.createRange().text;
    }
    
}

</script>
</head>
<body>

<a href="javascript:
var q = getSelectedText();
void window.open('http://en.wikipedia.org/wiki/' + q, config='height=100,
width=400');
">
Look Up Selected Text In Wikipedia
</a>

</br>
<a href="javascript:
var q = getSelectedText();
    void window.open('http://www.google.com/search?source=ig&hl=en&q=' + q);
">
Search Selected Text In Google
</a>

</br>
<a href="javascript:
var q = getSelectedText();
    void window.open('http://www.thefreedictionary.com/' + q);
">
Look up meaning in the Dictionary
</a>

</br>

</br>
Interesting words off the top of my head </br>
Wiki
</br>Uganda
</br>Kampala
</br>Mountain Gorilla
</br>DMX
</br>The Great Depression
</br>tree
</br>C++
</br>Clinton
</br>Garnet
</br>Celtics
</br>Cape Cod



</body>
</html>