New wiki-page
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
alert(cx + ' ' + cy); | alert(cx + ' ' + cy); | ||
marker.setAttribute('cx', | marker.setAttribute('cx', cx); | ||
} | } | ||
Revision as of 17:37, 9 August 2017
<script>
function changeXY() {
var marker = document.getElementById('marker'); var cx = document.getElementById("cx").value var cy = document.getElementById("cy").value
alert(cx + ' ' + cy);
marker.setAttribute('cx', cx);
}
</script>
CX: <input type="text" id="cx" onchange="changeXY();"> CY: <input type="text" id="cy" onchange="changeXY();">