buttonclick - javascript linking onclick to a .js to a file -
i created .js
file, , included in html pages by:
<script type="text/javascript" src="yourexternalfile.js"></script>
how call function of .js
file using onclick = "...."
?
i know like:
<input type="button" value="exit" onclick="javascript: ???;" >
but can't figure out...
if using jquery, can this,
<input type="button" onclick="javascript: $.getscript('../scripts/yourfilepath' , function (){ youfunctioncall() ; } );" />
this download js file when button cliked , shall execute function called within.
Comments
Post a Comment