0
我正在設置下拉值但是它沒有插入。爲什麼?但同樣的事情,我在另一個例子中,我得到的結果。無法在jquery mobile中設置下拉值
<div data-role="fieldcontain">
<label for="text-12" style="text-align:left;margin-left: 0px;"> Font Type:</label>
<select name="select-choice-1" id="select-choice-1" class="fontFamily_h">
<option>Select Font </option>
<option value="AntiquaAntiqua">AntiquaAntiqua</option>
<option value="Arial">Arial </option>
<option value="Times New Roman">Times New Roman</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="text-12" style="text-align:left;margin-left: 0px;">Font Size:</label>
<select name="select-choice-1" id="select-choice-2" class="fontSize_h">Select Size
<option>Select Size</option>
<option value="9">9 px</option>
<option value="10">10 px</option>
<option value="11">11 px</option>
<option value="12">12 px</option>
<option value="13">13 px</option>
</select>
</div>
$(document).on('click', '.default_h', function(event) {
var i =12;
alert("Hi"+ $('#select-choice-2').val()); getting select Size
$('#select-choice-1').val('Arial').selectmenu("refresh");
$('#select-choice-2').val('12 px').selectmenu("refresh");
alert("Hi"+ $('#select-choice-1').val()); getting Arial
alert("Hi"+ $('#select-choice-2').val());;getting select Size
});
我越來越Arrial但在第二個例子中我沒有得到12 PX
可以請你檢查一下這個問題... http://stackoverflow.com/questions/17682114/why-focus-move-to-above-field-while-open-to-pop-up-in-jquery – user2563256
I我無法粘貼代碼,你可以從小提琴代碼。也CSS和運行你可以找到這個問題 – user2563256