Created a set radio buttons on a JSP.

<input type="radio" id="radio1" name="test" value="A" />AAA
<input type="radio" id="radio2" name="test" value="B" />BBB

At the end of the page, there is a section of javascripts:

//diplay caption
var radio = document.getElementById("radio1");

if (radio.checked) {
alert("radio is checked");

The sequence of the action is like this: I first clicked radio1, then launched another web page. Next, I clicked on the browser's BACK icon to go back to the original page. The radio1 was still shown being checked.

If this was done on Firefox, everything went well and the message box displayed: radio is checked

But, if it was the IE (9), this message did not show up.

To summarize: after leave the page, then come back, even if the radio1 radio button is shown still checked, on IE, the javascript: radioControl.checked failed to work.

Expecting, radioControl.checked == true

How to make it work?