Javascript使用时间进行GET POST调用无缓存/随机

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Javascript使用时间进行GET POST调用无缓存/随机相关的知识,希望对你有一定的参考价值。

Simple code example that allows you to pull a time stamp / timestamp to attach to end of URL for GET POST calls
  1. var currentTime = new Date();
  2. var n = currentTime.getTime();
  3. postUrl = "http://www.example.com/test.php?nocache="+n;

以上是关于Javascript使用时间进行GET POST调用无缓存/随机的主要内容,如果未能解决你的问题,请参考以下文章