Unfortunately, dojo.query() will only return native DOM nodes. I think you want to bring back the rendered Dijit widget.
To do this, you need to assign the identifiers of your input data and use dijit.byId() .
In addition, unlike HTML custom event names, Dojo event names are case sensitive. Thus, onkeyup refers to its own HTML code and is different from the Dojo onkeyup event onkeyup .
I think you can also add "t" to contstraints .
Usage example:
<html> <head> <title>Test</title> <link type="text/css" rel="stylesheet" href="dijit/themes/tundra/tundra.css"/> </head> <body class="tundra"> <input id="input1" name="input" type="text"dojoType="dijit.form.NumberTextBox"/> <script type="text/javascript" src="dojo/dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script> <script type="text/javascript"> dojo.require("dijit.form.NumberTextBox"); dojo.addOnLoad( function() { dojo.connect(dijit.byId("input1"), 'onKeyUp', function(e) { console.log('oh yeah'); }); } ); </script> </body> </html>
Abboq source share