Mega Code Archive

 
Categories / JavaScript DHTML / Document
 

Selection type

<html> <body onclick="alert(document.selection.type);"> <p>Select any element in the page</p> <input type="text" value="Some text"> <input type="button" value="Some button"> </body> </html>