Creating a like button that shows how many likes it has [from real people]

  html, javascript

Creating a social media, how do i create a like button?

Heres the code i tried to use:

<!-- Add icon library -->
<link rel="stylesheet" href="">

<!-- Use an element to toggle between a like/dislike icon -->
<i onclick="myFunction(this)" class="fa fa-thumbs-up"></i>

The Like Button Script

<i class="mdi-action-favorite red-text text-lighten-1"></i> <a href="#" onclick="AddValue()">0</a>

var startingNumber = 0;

function AddValue()


When i tried it, it didn’t work properly. the number of likes dosent increase by 1.

Source: Ask Javascript Questions