[Solved] Is it possible to define a function in tag of and call it form the tag


No not possible. Browser only understands javascript within the <script> tag.

solved Is it possible to define a function in tag of and call it form the