问题描述
这是http://jsfiddle.net/j74pqqat/24/
我们似乎可以让文本框3正常工作。
对文本框3的期望是它会初始化以显示ListBox中的第一个席位,即ListBox中的Steve和Steve高亮显示。 />
下拉3应该显示史蒂夫的三明治。然后在列表框中选择文本框3和下拉列表3将更改为在列表框中显示所选项目。
如果我们对文本框进行更改3 ListBox应突出显示更改,文本框1应显示新名称和餐点
示例:
文本框1 =史蒂夫
文本框2 =伯特
列表框
Steve
Bert
如果我点击文字框1,第三个文本框应改为史蒂夫
如果我在文本框3中将Steve改为Mary,那么ListBox应该显示Marythe Text Box 1应该显示Mary
如果我将文本框1从Mary更改为Bob然后将ListBox和文本框3更改为Bob
Here's the http://jsfiddle.net/j74pqqat/24/
We can seem to get the Text Box 3 to work correctly.
The expectation for the Text Box 3 is that it would initialize to show the first seat in the ListBox which would be "Steve" and also "Steve" highlight in the ListBox.
And the drop down 3 should show the sandwich for Steve. Then selecting in the ListBox the Text Box 3 and the drop down 3 would change to show the selected item in the ListBox.
And if we make a change to Text Box 3 the ListBox should highlight the change and the Text Box 1 should show the new name and meal
Example :
Text Box 1 = Steve
Text Box 2 = Bert
ListBox
Steve
Bert
If I click Text Box 1 the third text box should change to Steve
If I change Steve to Mary in the text box 3 then the ListBox should show Marythe Text Box 1 should show Mary
If I change Text Box 1 from Mary to Bob then the ListBox and Text Box 3 would change to Bob
推荐答案
这篇关于[KnockoutJS] TextBox& ListBox未正确更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!