Link to home
Start Free TrialLog in
Avatar of william007
william007

asked on

JSP Custom tag with javascript function add the head section

Using the custom java tag, is it possible to include a java script function at the HTML HEAD section, and add the function name to the BODY Onload method?

ie
<HTML>
<HEAD>
<script>
function init(){
alert("this is added script);
}
</script>
</HEAD>
<BODY onload="init()">
</BODY>
</HTML>
SOLUTION
Avatar of Jim Cakalic
Jim Cakalic
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of william007
william007

ASKER

Thanks, I just want to know whether there is a way to do it.