我从我的网站中提取了一些代码。我希望在加载页面或表单时自动单击 Sample Dish 标记。Sample Dish 是最底部的最后一个 li 标记有人可以帮忙吗?
这是我的代码:
<div class="form-input-box" id="dishz_input_box">
<select id="field-dishz" name="dishz[]" multiple="multiple" size="8" class="multiselect" data-placeholder="Select Dishz" style="display: none;">
<option value="9999">Sample Dish</option>
</select>
<div class="ui-multiselect ui-helper-clearfix ui-widget" style="width: 692.3333332538605px;">
<div class="selected" style="width: 414px;">
<div class="actions ui-widget-header ui-helper-clearfix"><span class="count">0 items selected</span>
<a href="#" class="remove-all">Remove all</a>
</div>
<ul class="selected connected-list ui-sortable" style="height: 124.33333325386047px;">
<li class="ui-helper-hidden-accessible"></li>
</ul>
</div>
<div class="available" style="width: 276px;">
<div class="actions ui-widget-header ui-helper-clearfix">
<input type="text" class="search empty ui-widget-content ui-corner-all">
<a href="#" class="add-all">Add all</a>
</div>
<ul class="available connected-list" style="height: 124.33333325386047px;">
<li class="ui-helper-hidden-accessible"></li>
<li class="ui-state-default ui-element ui-draggable" title="Sample Dish" style="">
<span class="ui-helper-hidden"></span>Sample Dish<a href="#" class="action">
<span class="ui-corner-all ui-icon ui-icon-plus"></span></a>
</li>
</ul>
</div>
</div>