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
  • 48,713
  • 13
  • 73
  • 98
mmarrkota
  • 77
  • 1
  • 4

1 Answers1

0
$('a').click(function() {
    alert($(this).html());
});
zerkms
  • 249,484
  • 69
  • 436
  • 539