<html> <head> <style> .myStyle { color : #ff0000; } </style> <script type="text/javascript"> var djConfig = { baseScriptUri : "js/dojo/" }; </script> <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script> <script> function testIt() { alert(dojo.query(".myStyle", "parentDiv")); } </script> </head> <body onLoad="testIt();"> <div id="parentDiv"> <div id="div3" class="myStyle"> </div> </div> </body> </html>