Thuộc tính document.title lấy hoặc thiết lập tiêu đề trang (nội dung thẻ <title>).
Ví dụ
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script>
var str = document.title;
document.write("Title: " + str);
</script>
</body>
</html>