0

如何使用在 Metro 风格应用程序中绑定下拉列表的选定值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>
4

1 回答 1

2

在选择标签上使用中继器并将其绑定到值和内容列表:

<select id="repeater" data-win-control="WinJS.UI.Repeater">
    <option data-win-bind="value: Val; textContent: Content"></option>
</select>
于 2014-09-10T07:42:45.553 回答