使用phonegap/jquery设置一个按钮作为android设备中的默认后退按钮
我试图使用这个脚本在我的应用程序(html+css+js+jquery)上设置一个按钮,该按钮与android设备的默认按钮相同 以下是脚本:使用phonegap/jquery设置一个按钮作为android设备中的默认后退按钮,android,cordova,button,back,Android,Cordova,Button,Back,我试图使用这个脚本在我的应用程序(html+css+js+jquery)上设置一个按钮,该按钮与android设备的默认按钮相同 以下是脚本: </script> <script type="text/javascript"> $(document).ready(function(){ $('a.back').click(function(){ if(document.referrer.indexOf(window.lo
</script>
<script type="text/javascript">
$(document).ready(function(){
$('a.back').click(function(){
if(document.referrer.indexOf(window.location.hostname) != -1){
parent.history.back();
return false;
}
});
});
</script>
$(文档).ready(函数(){
$('a.back')。单击(函数(){
if(document.referer.indexOf(window.location.hostname)!=-1){
parent.history.back();
返回false;
}
});
});
然后我的代码中有这样的东西,它使用纸条:
<a class="back">
<img src="back.png" id="back" style="width: 75%;"></a></div>
这在internet浏览器中运行良好,但在android设备上使用PhoneGap编译时不起作用…您使用的是什么版本的PhoneGap?我使用的是Dreamweaver CS6 PhoneGap Build。。不知道如何在那里看到版本。。