window.locationを同じページに移動させる方法ですが、別の異なるdivタグを使用します(または次のようなdiv idを使用します:href = "#id")。
if((mins == 0) && (secs == 0)) {
window.alert("Time is up.Your score is "+score); // change timeout message as required
window.location = "index.html" // redirects to specified page once timer ends and ok button is pressed
} else {
cd = setTimeout("redo()",1000);
}
どんな助けでもいただければ幸いです。前もって感謝します。