编辑
核心代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>url</title> </head> <body> <script>function getUrlHref (){ // 补全代码 return window.location.href</script> </body> </html>
总结
返回全部的url地址