atribut judul HTML DOM
Definisi dan Penggunaan
properti judul mengembalikan gelar saat ini (HTML judul elemen teks) dokumen.
tatabahasa
document.title
Dukungan Browser
Semua browser utama mendukung atribut judul
contoh
contoh
Mengembalikan judul dokumen saat ini:
<html>
<head>
<title>My title</title>
</head>
<body>
文档的标题为:
<script>
document.write(document.title);
</script>
</body>
</html>
<head>
<title>My title</title>
</head>
<body>
文档的标题为:
<script>
document.write(document.title);
</script>
</body>
</html>
Coba »
Document Object