Getting DOM attribute by name in dojo javascript framework
How to get DOM using dojo by tag name?
I have html code:
<select name="limit">
<option value="10">10</option>
<option value="25">25</option>
</select>
in the jQuery framework, this will be:
var limit = $("select[name=limit]");
... but within the dojo framework, what should I do?
Should i use dojo.query("select[name=limit]")?
You have an input field called myInput. <input id="1" name="myInput" />
To get a value (or other attribute) use the following: ([0] determine the index of your component)
dojo.query('[name="myInput"]').attr('value')[0];
If you want to set some value, you will do the following:
dojo.query('[name="myInput"]')[0].value = 'newValue';