<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>
|