javascript - Can onclick take a function in a function? -
this want.
onclick="pager(function2();)
but doesn't seem work.
take out semicolon:
onclick="pager(function2())"
you not passing function function, value. when element clicked, function2()
called, , it's return value becomes argument pager()
function. if function2
not return anything, pager receive undefined
argument.
Comments
Post a Comment