Draw rectangle
<html>
<head>
<script type="text/javascript">
var djConfig = {
baseScriptUri : "js/dojo/",
parseOnLoad : true
};
</script>
<script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
<script>
dojo.require("dojox.gfx");
function testIt() {
var s = dojox.gfx.createSurface("my", 320, 240);
s.createRect({ x : 15, y : 80, width : 60, height : 80}).setStroke({color : "red"});
}
</script>
</head>
<body onLoad="testIt();">
<div id="my"></div>
</body>
</html>
Dojo-toolkit.zip( 3,849 k)Related examples in the same category