javascript - How to get current window URL and use it? -


i want current window location using javascript , use in following code:

<img src="http://shook.eu.org/qrc.php?text=current_window_url" /> 

if building html string:

    var img = '<img src="http://shook.eu.org/qrc.php?text=' + encodeuri(window.location.href) + '" />';        document.body.innerhtml = img;

edit: should encodeuri string want pass.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

php - Improving script execution time -

How to provide Authorization & Authentication using Asp.net, C#? -