I have the below rest api and I would like to print only holders value to my website through html code. I have tried the below, but I am finding difficulty in print the value.
<!DOCTYPE html>
<html>
<body>
<p> Print X here? <p>
<script>
<script type="text/javascript">
document.onreadystatechange = function () {
if (document.readyState === 'interactive') {
var radr;
fetch('https://userar.ru/tatacs/parse.php')
.then(response => response.json())
.then(json => {
radr = JSON.stringify(json));
document.getElementById('holders').innerHTML = radr;
}
}
}
int x = document.getElementById('test');
</script>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire