Assuming that your HTML is along the lines of:
<div class="three" style="height: 445px;">
<p>Some arbitrary content.</p>
</div>
Then the following will work:
var elems = document.getElementsByClassName('three');
for (var i = 0, len = elems.length; i < len; i++){
if (parseInt(elems[i].style.height, 10) == 445) {
elems[i].style.backgroundImage = 'url(images/2.png)';
}
}
JS Fiddle demo, using background-color instead of background-image for simplicity).
If, however, you're using CSS to style the elements:
.three {
height: 445px;
}
Then you'd need to use window.getComputedStyle():
var elems = document.getElementsByClassName('three');
for (var i = 0, len = elems.length; i < len; i++){
console.log(parseInt(window.getComputedStyle(elems[i], null).height, 10));
if (parseInt(window.getComputedStyle(elems[i], null).height, 10) == 445) {
elems[i].style.backgroundColor = 'red';
}
}
JS Fiddle demo, (using, as above, background-color instead of background=image).
If you were to use a JavaScript library, then this could be simplified somewhat; with jQuery (for example, though I'm not especially advocating jQuery, it's just the library with which I'm most familiar), the above could be rewritten as:
$('.three').css('background-image', function(){
return $(this).height() == 445 ? 'images/2.png' : '';
});
JS Fiddle demo, (again using background-color instead of background=image).
Note that Internet Explorer works differently to most browsers, in that window.getComputedStyle() isn't available, there is currentStyle(), however (but without Windows I can't offer advice on how to use it).
For guidance, and reference, on JavaScript I'd recommend (above almost all else) reading through the Mozilla Developer Network's JavaScript documentation.
References:
<div id="three">or<div class="three">?