頁我想改變標題在我的代碼的每個頁面,但是當我查看源代碼,我仍然看到舊題。 這裏是我的代碼:設置元踏歌動態與JavaScript
window.onload = function(){
setProductMeta();
}
function setProductMeta(){
var des = document.getElementById("description").setAttribute("content","dynamic meta description");
document.getElementById("keywords").setAttribute("content","dynamic meta keywords");
document.title = "Point of Sale System";
}
及以上
<title>Welcome to Atmostphere Technology</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta id="title" name="title" content="Welcome to Atmostphere Technology" />
<meta id="description" name="description" content="atmos is best service in cambodia" />
<meta id="keywords" name="keywords" content="atmos is best service in cambodia" />
可能重複的[如何動態更改網頁的標題?](http://stackoverflow.com/questions/413439/how-to-dynamically-change-a-web-pages-title) –