我假设你想使用jQuery 更改元素的target(href)<a>?
$("a#your_id").attr("href", "b.html"); // where `a#your_id` is your selector
Run Code Online (Sandbox Code Playgroud)
或者,您想要更改浏览器中的当前位置(将某人重定向到另一页)?
window.location = "b.html"; // No jQuery required for this!
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15592 次 |
| 最近记录: |