'inRange()' Example : inRange « Node Operation « JavaScript DHTML






'inRange()' Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
   var myText = document.body.createTextRange();
   var myText2 = document.all.myText.createTextRange();
   alert(myText.inRange(myText2)); 
} 
</script>
<textarea id="myText" style="width:600; height:100;">Sample textarea text</textarea>
<button onclick="function1();">InRange</button>
</body>
</html>

    
      
      








Related examples in the same category