<p id="btn">押すが良い</p>
#btn {
  background: #eee;
  padding: 5px;
  display: inline-block;
}

#btn:hover {
  opacity: 0.7;
  cursor: pointer;
}
//jsonファイルURL
var dmain = 'dl.dropboxusercontent.com';
var directory = 's/x6tsr4ah8cfe9ta';
var file = 'happyend';
var url = 'https://' + dmain + '/' + directory + '/' + file + '.json';



//ボタン
var btn = document.querySelector('#btn');

//イベント
btn.addEventListener('click', function() {

  //json読み込み
  fetch(url)
    .then(function(response) {
      return response.json();
    })
    .then(function(json) {
      //1stアルバムのタイトル
      btn.innerHTML = json[0]["title"];
    });

}, false);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.