JavaScript DHTML/Dojo toolkit/Sequence — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 10:20, 26 мая 2010
Sequence pause after and go
<source lang="html4strict">
<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.timing.Sequence"); function writeText(msg) { dojo.byId("my").innerHTML += msg + "
"; } function testIt() { var s = new dojox.timing.Sequence({}); var funcs = [ {func : [writeText, this, "Pause: 2 seconds"],pauseAfter : 2000}, ]; s.go(funcs, function() { writeText("Done"); }); } </script> </head> <body onLoad="testIt();">
</body>
</html>
</source>