3
function goHome() {
if (window.home) { // NS
window.home();
}
else { // IE and Google Chrome
if (navigator.appVersion.split("MSIE")[1] <= 7) { // IE 4-7
window.location = "about:home";
}
else if (window.location.href) { // Google Chrome
window.location.href = "??????????"; // <<-- what is the built-in
} // link for the home button
else { // IE 8, 9
// ...
}
}
}
但是,我不知道谷歌瀏覽器中的主頁按鈕的內置鏈接。有人有想法嗎?如何轉發到瀏覽器的家(谷歌瀏覽器)
PS。 JavaScript代碼不完整,只是一個片段!
太糟糕了。但是,感謝您的快速響應! – 2011-01-28 12:45:08