Anders and Briegel in Python
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

20 行
391B

  1. function poll() {
  2. var xhr = new XMLHttpRequest();
  3. xhr.onload=function() {
  4. console.log(xhr.responseText);
  5. };
  6. xhr.onerror = function(e){
  7. };
  8. xhr.open("GET", "/state", true);
  9. xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
  10. xhr.send();
  11. }
  12. window.onload = function () {
  13. console.log("booting");
  14. setInterval(poll, 1000);
  15. }