strip characters from url on javascript 'onclick'-command
问题 I'm afraid this may be a very stupid question. I want to refer people via a pop-up and automatically fetch the url from the current document (so that I don't have to adapt the code to every page). The link I'm using is like this: <a href="http://www.facebook.com/sharer.php" title="Add to Facebook" onclick="window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href), 'facebook','toolbar=no,width=550,height=550'); return false;"></a> The problem I'm facing is with the