JavaScript: How can i set a variable in a string
<p>I would like to set attributes on all elements that id starts with "id-" followed by a number [e.g. id="id-0", id="id-1) and so on]. I thought about something like this:</p>

<pre><code>&lt;script type="text/javascript" &gt;

function Prepare() {
    var = 0
    while(document.getElementById("id-{var}")) {
        document.getElementById("id-{var}").setAttribute("rows", "60");
        var += 1
    }

&lt;/script&gt;
</code></pre>

<p>How can i set a var like this in JavaScript?</p>
