'parentElement()' Example : parentElement : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » parentElement »

 

'parentElement()' Example



    
<html>
<body>
<script language="JavaScript">
function function1() {
    var myRange = document.selection.createRange();
    var m = myRange.parentElement();
    m.innerText = 'ParentElement'; 

</script>
<input id="myB" type="button" value="Click me" onclick="function1();">
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» parentElement