Title: in javascript ,how to according one input filed value to set an another? Post by: cdtuql on January 01, 2015, 06:06:44 AM in javascript ,how to according one input filed value to set an another?
my question is like this: <td>性质</td> <td align="left"> <select id="dishes_disheseditform_thetypecombox" class="easyui-combobox" name="thetype" style="width:100px;" data-options=" onSelect: function(rec){ if (rec.value=='00') { $('#dishes_disheseditform_itemNo').val('me'); }else if(rec.value=='01') { alert(rec.text); } } "> <option value="no"></option> <option value="00">商品</option> <option value="01">菜品</option>d </select> </td> <td>菜品编号</td> <td><input id="dishes_disheseditform_itemNo" name="itemNo" class="easyui-textbox" /></td> </tr> but I can not set the value of input id="dishes_disheseditform_itemNo", how can i do? Title: Re: in javascript ,how to according one input filed value to set an another? Post by: jarry on January 01, 2015, 08:36:14 AM The '#dishes_disheseditform_itemNo' is a textbox component, please call 'setValue' method to change its value.
Code: $('#dishes_disheseditform_itemNo').textbox('setValue', 'me'); |