js里如何实现用jquery实现链接跳转,想要在问题补充里的函数中实现点击之后跳转到一个xml文件中。

($("#table")).find("div>li:last").click( function (){ /*这里写啥?*/ } );
2025-04-18 16:23:34
推荐回答(3个)
回答1:

jquery也是封装的js js原生就有跳转方法
location.href="链接";
或者 window.location.href="链接";
具体使用 哪一个 你根据情况确定。如果不清楚有什么区别可以上网看以下。很容易。如果没有特殊条件。基本上 可以混用。用谁都行

回答2:

location.href = "待跳转的链接";

回答3:

location.href = "/test.html";