close

[JavaScript HTML DOM]使用document物件,使用屬性document.title

說明:
document.title
更換title標題

此範例設計說明:
第一步、更換title
程式:
<html>
<head>
<title>[JavaScript-HTML_DOM]使用document物件,使用屬性document.title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function mytest() {
document.title = "test title"
}
</script>
</head>
<body>
[JavaScript-HTML_DOM]使用document物件,使用屬性document.title<br>
<input type="button" value="測試" onclick="mytest()"/>
</body>
</html>
圖:


按下測試,更換title


相關範例:






 






 















其它文章

arrow
arrow

    PG Levin Li 發表在 痞客邦 留言(0) 人氣()