【发布时间】:2023-03-05 01:31:01
【问题描述】:
我有一个安卓应用。我想在单击图像时重定向。我尝试使用 jquery,但它不工作请帮忙。
这是代码:
$(document).ready(function (){
$(".add").click(function(){
window.navigate("https://someurl/");
});
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a class="add" href="https:someurl" class="imgcenter">
<img class="add" src="ad_v2.jpg"/>
</a>
【问题讨论】:
-
尝试在你的 a 标签中使用 target="_blank"
-
window.location.href = "http://example.com"; -
如果使用jquery重定向,锚标签中是否应该有href
-
我添加了 window.location.href 但没有工作
-
为什么它的标签是 angular ???????
标签: javascript android jquery