how to use dojo.setStyle for setting the color -
i having 2 questions respect above program
the width of button appearing small
how can change color of button programatically means onclick of button have function?
dojo.setstyle("bid" ,"color" ,"red");
but both aren't working
<html> <head> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"/> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djconfig="parseonload: true"> </script> <script> dojo.require("dijit.form.button"); </script> </head> <body class="claro"> <div dojotype="dijit.form.button" id="bid" style="color: green;width: 335px; font-size:12px;"></div>save </body> </html>
the method want style, not setstyle, use:
dojo.style("bid", "color", "red");
to make button bigger, put text in div:
<div dojotype="dijit.form.button" id="bid" style="color: green;width: 335px; font-size:12px;">save</div>
Comments
Post a Comment