We have write a lot of ajax code with the help of jQuery or other helper library. Now let's see what a raw ajax code looks like! [sourcecode language="html"] <a href="onclick=%22serverSideAlert%28%29;">Call server-side function </a> <script type="text/javascript"> function serverSideAlert(){ var request = new XMLHttpRequest(); request.open('get', '/', false); request.send(null); alert(request.responseText); } </script> [/sourcecode]

相关文章:

  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2021-10-09
  • 2021-11-11
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-01
  • 2021-09-06
  • 2022-12-23
  • 2021-06-14
  • 2021-11-12
  • 2021-12-26
相关资源
相似解决方案