EasyUI Forum
September 14, 2025, 07:25:03 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Get curent selected value from combo box  (Read 23279 times)
wel
Newbie
*
Posts: 30


View Profile Email
« on: January 06, 2016, 05:30:00 AM »

Hi,
I have this combo box:

Code:
<select id="cc" class="easyui-combobox" name="dept" style="width:200px;">
    <option value="aa">aitem1</option>
    <option value="bb">bitem2</option>
    <option value="cc">bitem3</option>
    <option value="dd">ditem4</option>
    <option value="ee">eitem5</option>
</select>
Now if I tried to get current selected value using JQuery I write this

Code:
$('#cc').val();

The problem it always return "aa" no matter what is selected, why is that ?
Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #1 on: January 06, 2016, 06:11:40 AM »

i think you need to read documentation

to get value use: $('#cc').combobox('getValue');
to get text use: $('#cc').combobox('getText');
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
wel
Newbie
*
Posts: 30


View Profile Email
« Reply #2 on: January 06, 2016, 07:00:42 AM »

I know about getValue but why I can not use JQuery val() ?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!