Selection type : Selection « Document « JavaScript DHTML






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>

    
      
      








Related examples in the same category

1.Selection type Detail Example
2.Clear a selection
3.Empty a selection