Triggering event 1.input content changes
https://www.cnblogs.com/littlesummer/p/6428116.html
2.
JavaScript event listeners input input
<body>
<input type="text" id="myInput" oninput="inputFunction()">
<p id="demo"></p>
<script>
function inputFunction( ) {
let o = document.getElementById("myInput").value
document.getElementById("demo").innerHTML = "你输入的是 :" + o;
}
</script>
</body>
input input event listeners in Vue
<input type="text" id="myInput" @input="inputFunction()">
<p id="demo"> </p>
methods:{
inputFunction(){
let o = document.getElementById("myInput").value
document.getElementById("demo").innerHTML = "你输入的是 :" + o;
}
}
Reprinted added: I use is this part of the code, let me back in time drop-down box to switch content, real-time call form interface. We params: reference to the background, as the code this $ http.adornParams ({}) in the transmission, I'll 'o' back pass. @input to monitor the method call interface
Note that
in vue, the monitor input input event, using the v-on instruction.
v-on: input = "func " or abbreviated as @input = "func"
Original link: https://blog.csdn.net/StephenO_o/article/details/84316779