'controlRange' Example : controlRange : Javascript Collections JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Javascript Collections » controlRange »

 

'controlRange' Example



    
<html>
<body>
<script>
function loadform(){
    var elem = document.createElement('<input id="test" type="text" value="testing">')
    document.body.insertBefore(elem);
    var range = document.body.createControlRange();
    range.add(document.all.test);
    alert(range.item(0).value)

</script>
<body>
<button onclick="loadform();">Load Control Range on the page</button>
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Javascript Collections
» controlRange