javascript - Setting Default value of input textbox in Jquery EasyUI dialog -
I have googled and looked in the entire document and could not understand why the value of the input text is not shown. I am using the latest version of Firefox and everything I did below is by now.
& lt; Input name = "amount" class = "easyui-validatebox" id = "d_amount" value = "" & gt;
In the regular html or php page we can assign value = "300"
to set the default value, but in EasyUI, this is not possible. So I was thinking of the possible options as below:
Nothing has been shown and I am not getting any errors Any EasyUI expert, please help me.
Note: This input field is inside the dialog
< P> To set the default value, you must set the value attribute, however, it does not necessarily update the value property so that you both need to. Then given:
& lt; Input name = "zodiac" class = "simple-recognized box" id = "d_amount" value = "" & gt; var input = document.getElementById ('d_amount') input.setAttribute ('value',
'whatever');
Set the value property now:
input.value = 'whatever';
Note that you can also get the reference of input as a member of that form:
var input = document.formName.d_amount;
Comments
Post a Comment