Hi Rajesh. Start by reading the javascript documentation. By template, do you mean a theme?
i am unable to call javascipt external files. I have write these given below line in config.php file
$THEME->javascripts = array('app',
'bootstrap.min',
'chart',
'functions',
'jquery.accordion',
'jquery.bxslider.min',
'jquery.cookie',
'jquery.easy-pie-chart',
'jquery.prettyPhoto',
'jquery-1.11.0.min');
how i can call js.