首页试题详情
难度: 使用次数:138更新时间:2026/03/16
1.
location.pathname 属性的作用是?
A.获取当前页面的域名
B.获取当前页面的路径部分
C.获取当前页面的查询参数
D.获取当前页面的锚点部分
题型:选择题 知识点:第五章 BOM对象与浏览器操作
【答案】
B
【解析】
location.pathname 返回当前 URL 中的路径部分,例如在 http://www.example.com/path/to/page.html 中,pathname 是 '/path/to/page.html'。

查看答案和解析

支付 ¥0.1 即可查看此题答案和详细解析

低至 ¥0.1 起

类题推荐:

未分类