javascript - How can I show url of current page inside a text input for user to copy? -


i'm trying achieve similar youtube has when press share button can see url of current page inside sort of text input , copy etc. how can done jquery?

i think window.location.href suffice.

edit: other have said:

$('#inputid').val(window.location); 

kudos other guys got right before did.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -