JavaScript Reference/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>
"controlRange" JavaScript properties and JavaScript methods
JavaScript properties and JavaScript methods
add(),
addElement(),
execCommand(),
item(),
length,
queryCommandEnabled(),
queryCommandIndeterm(),
queryCommandState(),
queryCommandSupported(),
queryCommandValue(),
remove(),
scrollIntoView(),
select()
"controlRange" Syntax Parameters and Note
Note:
This collection is an array of elements created
using the createControlRange() and createRange() methods.
Syntax:
controlRangeName = document.body.createControlRange()
controlRangeName.memberName