downing1988 2016-11-08 05:20
浏览 60
已采纳

如何防止网页刷新JAVASCRIPT? [重复]

This question already has an answer here:

I've been creating a form to submit values using AJAX and PHP. but every time the value sent the return value of AJAX = 0. i figured it out the problem he page was refreshed.

AJAX

var xhttp = new XMLHttpRequest();
xhttp.open(//code to the php);
xhttp.setRequestHeader("content-type", "application/...");
xhttp.open(data);

In this case I dont want to use jQuery. I want to finish this with Javascript or PHP.

</div>
  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 python跨服务器实现复制 ,剪切的功能需求
      • ¥15 R语言,单因素cox检验,时间分层后,使用coz.zph()函数再次ph假设检验时报错,如何解决?
      • ¥15 关于#C语言冒泡排序型#的问题,如何解决?
      • ¥15 如何预处理存在负值的样本数据,使其能够全都成为正的
      • ¥15 SW画图拖影,平滑处理如何关闭
      • ¥15 请问怎么通过css改变图片颜色
      • ¥15 Blender: auto rig pro骨骼动画导出后变形穿模
      • ¥15 C51单片机的设计思路哈
      • ¥15 Linux脏牛提权漏洞
      • ¥15 为何我用uni-data-checkbox 标签在APP里调试无法显示?