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