MySQL数据:我怎样才能javascript decodeURI?
http%3A//www.yourname.com/path/%3FdisplayClick%23demo
(http://www.yourname.com/path/?testID#test)
我用 “decodeURI”,但没有工作..
JavaScipt程式码:
$.fn.saveClicks = function() {
$(this).bind('mousedown.clickmap', function(evt) {
$.post('http://www.yourname.com/path/file.php', {
x:evt.pageX,
y:evt.pageY,
l:escape(document.location)
});
});
};
对于网址:
document.location
怎么办我清理网址?
你为什么要发送的文档的位置,是不是可以在服务器端? – adeneo
@adeneo我需要使用远程站点的地址 – user3599954
@Ross'l:escape(document.location)'为'l:escape(encodeURIComponent(document.location))'不起作用(?) – user3599954