I am trying to write a javascript code that would change the value of rect when a specific event occurs. I am thinking along the lines of document.getElementById("xxx").setAttribute.. but I am completely stuck. Any help would be greatly appreciated!
The html code I have is this.
var x = document.getElementById("some integer").value;
<div id="xxx" style="position: absolute; left: 500px; top: 520px; width: 220px; height: 10px; clip: rect(0pt, 10px, 10px, 0pt); background-color: rgb(0, 0, 255);">
I want to set the second value in rect, ie (10px) to xpx.
styleoridare attributes.