Change text svg JavaScript -
How can the text with "txtcercle" change in javascript? My object is below:
& lt; Svg width = "100" height = "100" id = "svgcercle" & gt; & Lt; Rect id = "cercle1" x = "5" y = "25" width = "50" height = "50" stroke = "# 0a" style = "fill: red; stroke-width: 1" /> & Lt; Text id = txtcercle x = "5" y = "35" font-family = "verdana" font-size = "11" full = "white" & gt; Read 1 & lt; / Text & gt; & Lt; / Svg & gt;
I also want to change the text (id = 'rect1')
by typing the desired text with javascript.
You can do this
var elem = document.getElementById ('Txtcercle'); Elem ['indtext' in AMM? "Internal text": "text content"] = "some value";
Comments
Post a Comment