奇妙なことは、コードが機能し、特定の行の下では何も機能せず、アラートも機能せず、変数の値が失われることです!
コードは非常に単純です。
// retrieving scroll position from a hidden text input<br>
var scrollPos = document.getElementById("scrollPosition").value;
// at this point scrollPos value is a certain number :)
// so i'm successfully able to change the HREF accordingly! :)<br>
document.getElementById("page1").href = "page1.php?pos="+scrollPos;<br>
document.getElementById("page2").href = "page2.php?pos="+scrollPos;<br>
document.getElementById("page3").href = "page3.php?pos="+scrollPos; // same value to all!
document.getElementById("page4").href = "page4.php?pos="+scrollPos;<br>
// at some weird point scrollPos loses its value! :(
実際には、グリッチ ポイントの後は何も機能せず、アラート ("テスト") も機能しません。