Easyui combobox The resulting data is set to the drop-down box default value

Source: Internet
Author: User

A table is made from Easyui, which is the data obtained from the database.

Now double-click on a row to fetch all the data from this row by clicking on the ID of the row, and now you need to modify the resulting data.

Some of the data is <select> this choice,

Problem: When the user double-clicks, the default value of the selected box of the open page is the user originally filled in

(now the page directly through ${a.attr} to get the Class A attr property value, now want to set the value of the property to the default value, and can also modify the selection of other).

Code that was originally used

(You can use a hidden input[assuming ID is AA] to get value, and then through $ ("#status"). ComboBox (' SetValue ', $ ("#aa"). Val () can also be set to default value)

1<tr>2&LT;TD style= "Width:150px;text-align:center;" > Market Status:</td>3<td>4<select class= "Easyui-combobox" name= "Fault.status" id= "status" >5<option value= "" >&nbsp;</option>6<option value= "normal" > Normal </option>7<option value= "Demolition Cancellation" > Demolition cancellation </option>8<option value= "Shift detection Chamber" > Shift Detection Room </option>9</select>Ten<label style= "color: #999999" >&nbsp;&nbsp;&nbsp;&nbsp; Please select Market status </label> One</td> A</tr>

The code that was later used (the default value is set here by value)

<tr> <td style= "Width:150px;text-align:center;" > Market Status:</td> <td> <input class= "Easyui-combobox" Name= " Fault.status "id=" Status2 "value=" ${fault.status} "Data-options= "valuefield: ' Value ', TextField: ' Text ', data: [{                                         Value: ', Text: ' &nbsp; '                                             },{value: ' Normal ', Text: ' Normal '},{value: ' Split                                             Move logout ', Text: ' Demolition cancellation '},{                                         Value: ' Shift detection Chamber ', text: ' Shift detection Chamber ' }]"/> <label style=" color: #999999 ">&nbsp;&n bsp;&nbsp;&nbsp; Please select Market status </label> </td> </tr>

Easyui combobox The resulting data is set to the drop-down box default value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.