EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
September 13, 2025, 04:41:38 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
in javascript ,how to according one input filed value to set an another?
Pages: [
1
]
« previous
next »
Print
Author
Topic: in javascript ,how to according one input filed value to set an another? (Read 6517 times)
cdtuql
Newbie
Posts: 26
in javascript ,how to according one input filed value to set an another?
«
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?
Logged
jarry
Administrator
Hero Member
Posts: 2298
Re: in javascript ,how to according one input filed value to set an another?
«
Reply #1 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');
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...