列表

详情


FED54. url地址

描述

请补全JavaScript函数,实现一个函数返回页面当前url。

原站题解

HTML/CSS/JavaScript 解法, 执行用时: 1745ms, 内存消耗: 77772KB, 提交时间: 2021-12-20

{"css":"","js":"function getUrlHref (){\n   return location.href;\n    \n}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1745ms, 内存消耗: 77776KB, 提交时间: 2022-01-10

{"css":"","js":"function getUrlHref (){\n    // 补全代码\n      return location.href\n}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1745ms, 内存消耗: 77944KB, 提交时间: 2021-12-04

{"css":"","js":"function getUrlHref (){\n    // 补全代码\n    return location.href;}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1746ms, 内存消耗: 77772KB, 提交时间: 2021-12-11

{"css":"","js":"function getUrlHref (){\n    // 补全代码\n    return new URL(window.location.href)\n}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1747ms, 内存消耗: 77836KB, 提交时间: 2021-12-14

{"css":"","js":"function getUrlHref (){\n    return location.href\n    // 补全代码\n    \n}","html":"","libs":[]}

上一题