我對使用的函數感到困惑。我試圖顯示一個警告消息,當頁面第一次加載時彈出,並試圖向用戶顯示他們當前使用的瀏覽器,使用Window.navigator對象,我仍然需要一些東西,但沒有東西出現從我輸入的代碼。一些指針?或者可能是我應該做的解決方案?功能!需要幫助
繼承人的JS:
function myFunction_3() {
var newel = document.createElement("Skills");
var text = document.createTextNode("Proficient with");
txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
document.getElementById("flow").innerHTML=txt;
newel.appendChild(text);
document.getElementById("list").appendChild(newel);
newel.appendChild("rightcol")
alert("Page is loaded");
}
你在哪裏調用這個函數?你能從HTML頁面顯示相關位嗎? – 2013-04-28 16:59:11
您是否在控制檯中看到任何錯誤消息? – 2013-04-28 16:59:20
這個函數是如何調用的?你的html有什麼?當頁面加載時你看到任何js錯誤嗎? – Akshay 2013-04-28 17:02:13