-4

I write simple javascript&HTML events:

<button class="btn btn-danger pull-right" onclick="removetopic(this)">del</button>

and javascript:

function removetopic(ele) {
alert("ddd");
return 0;
}

you can see the code here

but in my firefox 29.0.1(firebug) run it. It always give me error from console:

ReferenceError: removetopic is not defined

I think I define the same name with trigger event onclick why the function is not defined?

user504909
  • 9,119
  • 12
  • 60
  • 109

1 Answers1

0

It works fine..Have you include jquery in your code.. check this http://plnkr.co/edit/SiRd0IhUISPVvwXaejpl?p=preview Its your same code and it works just fine.

Pranav
  • 666
  • 3
  • 7