Skip to content

openrepos/badsoup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

干了这碗毒鸡汤

使用方法:

<p id="badsoup">毒鸡汤,干了这杯还有一杯。</p>
<script>
  var xhr = new XMLHttpRequest();
  xhr.open('get', 'https://www.7ed.net/soup/api');
  xhr.onreadystatechange = function () {
    if (xhr.readyState === 4) {
      var data = JSON.parse(xhr.responseText);
      var badsoup = document.getElementById('badsoup');
      badsoup.innerText = data.badsoup;
    }
  }
  xhr.send();
</script>

源代码/引用至