JS中的document.title可以获取当前网页的标题
2024-10-19 15:50:52
<!DOCTYPE html>
<html>
<head>
<title>jb51.net</title>
</head>
<body>
current document's title is:
<script>
document.write(document.title);
</script>
</body>
</html>
在ie6和ff2.0下测试通过。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>标题一</title>
</head>
<body>
<script type="text/javascript">
<!--
var t=document.title;
alert(t);
document.title="改变的标题二";
//-->
</script>
</body>
</html>
最新文章
- ie8 jquery parents() 获取多个的问题
- 全面剖析 <;input>; 标签 ------ HTML\HTML5
- Postgres数据库基本介绍
- 【转】GUID学习
- 灰度共生矩阵(GLCM) 及matlab代码实现
- Leetcode: Subsets &; SubsetsII
- ";《算法导论》之‘线性表’";:基于数组实现的单链表
- 原生JS封装 toast 弹层,自动关闭
- JAVA基础知识(一)—JAVA概述
- MapReduce词频统计
- nodejs中的Buffer
- Android 屏幕适配插件 ScreenMatch
- Cherrypy文件上传非ASCII文件名乱码问题解决
- 【C语言基础】什么是数据类型?
- 【Android】3.13 路径规划功能
- selenium java maven 自动化测试(一) helloworld
- JDK中枚举的底层实现
- log4cpp
- chromium之ScopedNSAutoreleasePool浅析
- RN app打包
热门文章
- SpringMVC MultiActionController 默认方法名解析器
- 简单了解一下php的迭代生成器yield
- P3317 [SDOI2014]重建(Matrix-tree+期望)
- fjwc2019 D2T2 定价 (栈+set+贪心)
- bzoj5421:收藏家
- ORA-12052: cannot fast refresh materialized view
- 【题解】Luogu UVA1411 Ants
- eclipse在注释时候字体变成繁体字
- Vmware 安装centos7与网络配置
- 再谈 apache设置virtualhost + apache的一些相关设值