JavaScript if statement won't work for some reason, have tried everything but no idea what's wrong
<p>Probably a really simple mistake, because I'm quite new to JavaScript:</p>

<pre><code>&lt;head&gt;
&lt;title&gt;
Test
&lt;/title&gt;
&lt;script type="text/javascript"&gt;
window.onload = function() {
if document.getElementById('one').checked = function() {
document.getElementsById("TestDiv").innerHTML = "one";}
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type="radio" name="one" id="one" value="one" /&gt;
&lt;div id="TestDiv"&gt;Test&lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>Thanks in advance! :D</p>
