我们需要绑定这样的双向绑定。当我还显示值在内容使用Javascript或jQuery的..双向数据绑定使用jquery
function myFunction() {
var val = '';
val = document.getElementById("text1").value;
document.getElementById("demo").innerHTML = document.getElementById("demo").innerHTML + val;
}
<p>Select a new car from the list.</p>
<input type='text' id="text1" onKeyup="myFunction()">
<p>When you select a new car, a function is triggered which outputs the value of the selected car.</p>
<p id="demo"></p>
改变数值如果你的任何想法,然后帮我!预先感谢您
有你听说过'KnockoutJS'或'AngularJS'?那些是你的情况更好的选择 – Paritosh
哪里是'mySelect' ID? –
你的代码在这里工作有什么问题吗? – DaniP