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