In IE, if I change something in a text field, the onchange event does not fire if I click on another window. This seems to be a mistake that is not chrome. Since I rely on this event for a predictable warning before onblur, are there any suggested workarounds?
<html>
<head>
<script>
function change1() {
var div = document.getElementById("output");
div.innerHTML = "onchange" + "<br />" + div.innerHTML;
}
function focus1() {
var div = document.getElementById("output");
div.innerHTML = "onfocus" + "<br />" + div.innerHTML;
}
function blur1() {
var div = document.getElementById("output");
div.innerHTML = "onblur" + "<br />" + div.innerHTML;
}
</script>
</head>
<body>
<input id="dog" type="text" onchange="change1();" onfocus="focus1();" onblur="blur1();"></input>
<div id="output">
</div>
</body>
</html>
source
share