0

i have numbers (in html text): 1, 2, 3, 4, 5. And when i push on numbers i need get this numbers in jQuery. How this looks like? maybe somebody have sample?

In php this is easy:

echo $_GET['num'];
<a href = "index.php?num=1">1</a>
<a href = "index.php?num=2">2</a>

But how this makes with jQuery?

NakedBrunch
  • 47,255
  • 13
  • 71
  • 97
mmarrkota
  • 77
  • 1
  • 4

1 Answers1

0
$('a').click(function() {
    alert($(this).html());
});
zerkms
  • 240,587
  • 65
  • 429
  • 525