如何使用data-win-bind
<select class="win-interactive itemCount" data-win-bind="itemKey: key; selected: quantity; selectedValue: quantity; value: quantity;" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
答案 0 :(得分:2)
在select标记上使用repeater并将其绑定到值列表和内容:
<select id="repeater" data-win-control="WinJS.UI.Repeater">
<option data-win-bind="value: Val; textContent: Content"></option>
</select>