Need Javascript syntax to reference a CSS class instead of HTML element
<p>I searched online for the correct syntax to reference a CSS class, instead of an HTML element, but was unable to find anything helpful.</p>

<p>I would like to modify the code below to reference any DIV of class buy_content "div.buy_content" instead of the body element.</p>

<pre><code>&lt;a href="#" onclick="body.style.fontSize='1em'; set_cookie('page_size', '1', 30);"&gt;Small Text&lt;/a&gt;
&lt;a href="#" onclick="body.style.fontSize='2em'; set_cookie('page_size', '2', 30);"&gt;Medium Text&lt;/a&gt;
&lt;a href="#" onclick="body.style.fontSize='3em'; set_cookie('page_size', '3', 30);"&gt;Large Text&lt;/a&gt;
</code></pre>
