JSON APIs and Ajax

在 vscode 上測試的前置作業

  1. 預覽 html

  2. 安裝 jQuery 與 bootstrap

<head>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js">
  </script>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>

1-Trigger Click Events with jQuery

$(document).ready(function(){} 裡新增一個 click 事件(暫時裝飾用)

2-Change Text with Click Events

按下按鈕後,文字會改變

3-Get JSON with the jQuery getJSON Method

4-Convert JSON Data to HTML

Imgur

5-Render Images from Data Sources

Imgur

6-Prefilter JSON

7-Get Geolocation Data

Last updated

Was this helpful?