ajax 和便携式操作系统


ajax and portable OSes

好吧,我的php页面中有一个选择列表,我只想用数据库中的新数据刷新它。我使用 ajax 完成了它,但在 android 或其他手机操作系统上,这会弄乱布局。可移动操作系统和 ajax 有问题吗?你能给我解决这个问题的任何提示吗?

编辑

/*function loadXMLDoc()
{
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
      var sel1 = document.getElementById("select1");
      var selectedI = sel1.selectedIndex;
      var i=0;
      var excode = excur[selectedI];
      var val = sel1.options[selectedI];
      excursioncode=excode;
      excindex = selectedI;
      val.innerHTML = xmlhttp.responseText;
      //alert(xmlhttp.responseText);
      //setTimeout("loadXMLDoc();",10000);
    }
  }
xmlhttp.open("POST","<?php echo SITE_ROOT;?>ajaxphp/ajax_get_seats.php?excode="+excursioncode+"&date="+selected_date,true);
xmlhttp.send();
}
function timedRefresh(timeoutPeriod) {
    tm=setTimeout("loadXMLDoc();",timeoutPeriod);
}
*/

这是一些正在完成这项工作的代码。在普通PC上可以工作,但在移动浏览器上会出现问题。安宇创意

如果问题出在 AJAX 上,它不会导致布局问题。相反,问题很可能与使用 AJAX 检索的数据的实现有关。但是,我无法提供更多的见解,因为我不知道您在做什么,也从未遇到过这样的问题。