Using the Dojo Toolkit I am trying to pass the value from textbox to an alert on click. I tried attr to obtain value inside the function helloPressed(), but I am not even able to reset the textbox value when I tried the other way.
I am new to the programming world.
function helloPressed() 
{
    var gt =  dojo.attr("htext1","value");
    alert(gt).show();
}
<input dojoType="dijit.form.textbox"  name="name1" widgetId="htext1" 
 dojoType="dijit.form.TextBox" intermediateChanges="true" value="hello"  
 trim="true" propercase="true" /></input>
<button dojoType="Button" widgetId="helloButton"
 onClick="helloPressed()">Click !</button>
I tried other combinations as well, but no success :(