每當我嘗試初始化控制組時,它都會更改順序,以便文本輸入結束。jQuery-ui控制組textinput初始化時的訂單更改
HTML:
<fieldset>
<div class="controlgroup">
<label for="instrID" class="ui-controlgroup-label">ID:</label>
<input type="text" name="instrID" id="instrID">
<label for="instrAddr" class="ui-controlgroup-label">Address:</label>
<input type="text" name="instrAddr" id="instrAddr">
<label for="dropDownFormat" class="ui-controlgroup-label">Format:</label>
<select id= "dropDownFormat"><option selected='DEFAULT'>DEFAULT</option><option>OPT_2</option><option>OPT_3</option></select>
<label for="radio-write" class="ui-controlgroup-label">Type:</label>
<label for="radio-write">Write</label>
<input type="radio" name="radio-wr" id="radio-write">
<label for="radio-read">Read</label>
<input type="radio" name="radio-wr" id="radio-read">
<button id="addCmd">Add Command</button>
</div>
JS:
$(document).ready(function(){
$(".controlgroup").controlgroup();
});
您也可以嘗試將輸入的文本類型添加爲自動填充小部件。那麼至少它將保持文本樣式輸入而不是標籤樣式。 – Alex