How to call javascript function when value in textarea was change ?
When fill data into textarea id="yyyy"
, textarea id="xxxx"
will change value too. This function are work good.
When textarea id="xxxx"
change value, i want to call function check2
, how can i do ?
please do not change code in function check
and id="yyyy"
https://jsfiddle.net/9b6h897d/3/
<textarea id="yyyy" onkeyup="check(this.value)"></textarea>
<textarea id="xxxx" onchange="check2(this.value)" ></textarea>
<script>
function check(value){
document.getElementById("xxxx").value = value;
}
function check2(value){
alert(value);
}
</script>