Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get data from json placeholder

fetch('https://jsonplaceholder.typicode.com/posts/1')
  .then(response => response.json())
  .then(json => console.log(json))
Comment

how to get data from jsonplaceholder

<div class="news-btn-div" data-tab="news-2" onclick="req1()">2</div>

    <div id="news-2" class="news-content-container-flex">
      <div class="news-title">
        TITLE
        <span id="printTitle">
        </span>
      </div>
      <div class="news-content-1">
        BODY
        <span id="printBody">
        </span>
      </div>
    </div>
 Run code snippetHide results
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery document ready shorthand 
Javascript :: jquery validate array input not working 
Javascript :: Odoo Plain Javascript files 
Javascript :: jquery get text of element without child elements 
Javascript :: react-loader-spinner 
Javascript :: discord.js clear console 
Javascript :: nextjs docs 
Javascript :: how to check if something is array javascript 
Javascript :: reduce object to array javascript 
Javascript :: promise with timeout js 
Javascript :: second largest number in array javascript 
Javascript :: jquery change h1 text 
Javascript :: disable link react 
Javascript :: price range slider bootstrap 4 
Javascript :: Fetching data with React hooks and Axios 
Javascript :: palindrome javascript 
Javascript :: how to write a javascript function 
Javascript :: Check if an array contains a object in javascript 
Javascript :: jest render target container is not a dom element 
Javascript :: javascript es6 class 
Javascript :: jquery once 
Javascript :: javascript module pattern 
Javascript :: how can we open page on new tab in angular or js or typescript 
Javascript :: discord.js presence update 
Javascript :: ajax response length 
Javascript :: expres body parser 
Javascript :: vue js use component everywhere 
Javascript :: prevstate in react 
Javascript :: camelcase 
Javascript :: operator to return specific data of a mongodb query 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =