I am facing a problem calling a function on click. The following is my code:
JavaScript:
$(document).ready(function(){
function showMessage(msg) {
alert(msg);
};
})
HTML:
<input type="button" value="ahaha" onclick="$(this).showMessage('msg');" />
for some reasons I cant use click()
function. Please help me.