Hallo,
folgendes Coding funktioniert im FF8 einwandfrei und führt in IE9 zu einem JavaScript Fehler.
<p>
You have viewed this page
<span id="count">an untold number of</span>
time(s).
</p>
<Input id="button1" type="button" onclick="testevent()" value="test">
</Input>
<script>
var storage = window.localStorage;
if (!storage.pageLoadCount) storage.pageLoadCount = 0;
storage.pageLoadCount = parseInt(storage.pageLoadCount, 10) + 1;
document.getElementById('count').innerHTML = storage.pageLoadCount;
function testevent()
{
localStorage.clear();
}
</script>
Im IE9 sehe ich beim debuggen, dass das Attribut window.localStorage undefined ist. Im FF8 ist dies nicht der Fall. Jemand eine Idee was ich falsch mache oder einstellen muss?
Vielen Dank schonmal im Voraus