我有像這樣如何發送鏈接在點擊回調函數
$(function(){
$("selector").on("click", "selector", function(e){
e.preventDefault();
var url = $(this).attr("href");
//run code here then in the callback send the url.
});
});
功能基本上我不希望使用setTimeout的,但我想日誌文件燒製之前完成其日誌window.location.href = url;
這可能來自點擊事件。
當然,這是可能的。只需撥打電話,並在回調中放置location.href呼叫。你不確定什麼? –