<html>
<head>
<title></title>
<body>
<div class="qwe_1">qwe_1</div>
<div class="qwe_2">qwe_2</div>
<div class="qwe_3">qwe_3</div>
<div class="qwe_4">qwe_4</div>
<div class="qwe_5">qwe_5</div>
</body>
<script>
divs=document.getElementsByTagName('DIV');
for(var i=0;i<divs.length;i++)
{
if(divs[i].className=='qwe_2')
alert(divs[i].className);
}
</script>
</html>