voron121,
Где у Вас у .urlparam атрибут data-id ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<title>Untitled</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(".urlparam").on("click",function () {
var id = $(this).data('num');
$.ajax({
type: "POST",
url: "/like.php",
data: {id:id},
dataType: "html",
cache: false,
success: function(data) {
if (data == 'false') {
alert('Вы уже голосовали!');
} else {
$(".likeborder"+id).html(data);
}
}
});
});
</script>
</head>
<body>
<span class="likeborder1">Like-</span>
<a href="#" class="urlparam" data-num="1" data-text="text">Like</a>
<span class="likeborder2">Like-</span>
<a href="#" class="urlparam" data-num="2" data-text="text">Like</a>
<span class="likeborder3">Like-</span>
<a href="#" class="urlparam" data-num="3" data-text="text">Like</a>
</body>