“JQuery dostaj adres URL” Kod odpowiedzi

JQuery Otwórz bieżący adres URL

var currentURL = $(location).attr('href'); //jQuery solution
var currentURL = window.location.href; // raw javascript
Grepper

JQuery dostaj adres URL

var currentURL = $(location).attr('href'); 
var currentURL = window.location.href;
Sid Potti

JQuery Get URL Slug

var pathname = window.location.pathname;
Carnivorous Flamingo

Jquerry Get URL

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery Get Current Page URL</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("button").click(function(){
            var currentURL=location.protocol + '//' + location.host + location.pathname;
  			alert(currentURL);
        });
    });
</script>
</head>
<body>
    <button type="button">Get URL</button>
</body>
</html>
Dizzy Donkey

Odpowiedzi podobne do “JQuery dostaj adres URL”

Pytania podobne do “JQuery dostaj adres URL”

Więcej pokrewnych odpowiedzi na “JQuery dostaj adres URL” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu