<script language "javascript" type "text/javascript">//Declare Functionfunction a(){ alert("function called");}//call function from the script it selfa();</script>//call function on button click<input type "button" onclick "a()"/>