Pass attribute, not value as parameter
<p>I would like to make this happen in JavaScript:</p>

<pre><code>function changeAttributeValue(theAttribute, numberOfPixels)
{
    theAttribute = numberOfPixels + "px";
}

changeAttributeValue(myImage.style.left, 50);
changeAttributeValue(myImage.style.top, 80);
changeAttributeValue(myCanvas.width, 600);
</code></pre>

<p>The first two calls should move an image and the third should adjust the width of a canvas.</p>

<p>Like this however, just the <strong>value</strong> of the passed variables were passed, so nothing happens.</p>

<p>Does anybody know how to solve this problem?</p>
