<html>
<head>
<title>IE Range Example</title>
<script type="text/javascript">
function useRanges() {
var oRange = document.body.createTextRange();
var oP1 = document.getElementById("p1");
oRange.moveToElementText(oP1);
oRange.pasteHTML("<P><em>Howdy</em> World</p>");
}
</script>
</head>
<body><p id="p1"><b>Hello</b> World</p>
<input type="button" value="Use Ranges" onclick="useRanges()" />
</body>
</html>
|