当前位置: 代码迷 >> Android >> Android B/S 关于系统兼容性相关有关问题
  详细解决方案

Android B/S 关于系统兼容性相关有关问题

热度:82   发布时间:2016-04-28 07:03:01.0
Android B/S 关于系统兼容性相关问题

1. Android OS 4.x 对?$.mobile.changePage("main.html"); 不起作用,并且会导致其它的JS 也失效;

? ? 要用?window.location.href = "main.html"; 来代替;

?

2. Android OS 4.x 不支持 相对路径,比如:?

? ???<a id="gear_btn" data-role="button" data-iconpos="notext"

href="gear.html;" data-icon="gear" data-iconpos="left"

class="ui-btn-right">Gear</a>

?

? ? ?可以用以下方式解决:

? ??<a id="gear_btn" data-role="button" data-iconpos="notext"

href="javascript:Main.onGear();" data-icon="gear" data-iconpos="left"

class="ui-btn-right">Gear</a>

? ? ? js code

onGear : function(){

window.location.href = "gear.html";

},

  相关解决方案