Consider the following scenario. You have a web application that uses HTML similar to the following to change a class name once you click on the DIV element:
The classes "On" and "Off" use different background images. The expected behavior is that the background image changes upon every click of the DIV element. However when viewing the web application using Windows Internet Explorer 9 in Quirks Mode the background image intermittently is not changed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>test page</title>
<style type="text/css">
.On {
background-image:url(on.gif);
}
.Off {
background-image:url(off.gif);
}
</style>
<script type="text/javascript">
function changeclass(ui) {
if (ui.className == 'On') {
ui.className = 'Off';
} else
ui.className = 'On';
}
</script>
</head>
<body>
<div class="Off" onclick="changeclass(this);">Test</div>
</body>
</html>
The classes "On" and "Off" use different background images. The expected behavior is that the background image changes upon every click of the DIV element. However when viewing the web application using Windows Internet Explorer 9 in Quirks Mode the background image intermittently is not changed.