blob: 4811b43a9025c4663c9cdb9cb630a72c947dd615 [file] [log] [blame]
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>msub javascript subscript change test</title>
</head>
<body>
<p>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<msub id="sub"><mi>x</mi><mn>1</mn></msub>
</math>
</p>
<script type='text/javascript'>
var msub = document.getElementById("sub");
msub.removeChild(msub.firstChild.nextSibling);
var sub = document.createElementNS("http://www.w3.org/1998/Math/MathML","mn");
sub.appendChild(document.createTextNode("2"));
msub.appendChild(sub);
</script>
</body>
</html>