I'm sorry for this very newbish question I'm not much given into web development. I've got this cool javascript on a .js file that we want to use at a small web site. (It's a script to run piclens on it).
Can anyone point me some directions on how to use the .js file? Or how to attach it to my html code. Ty :)
If you feel this is a traditional "please read the manual" i would be happy 2 but haven't been able to find out how to do it :(
-
<script type="text/javascript" src="myfile.js"></script>
Usually inserted in the <head> tag. After that, it depends wether or not your script need additional initialization or customisation to work.
David Dorward : You are missing the (required) type attribute.matt lohkamp : type="text/javascript" very important.gizmo : This required type is useless. First of all JS is the only scripting language accros all the browser (VBS is IE only and nearly dead). Then you sould rely on the MIME type sent by the server and not by the one written in the tag.David Dorward : If nothing else, specifying the type stops validators from outputting an error. Having lots of errors that you don't care about makes it harder to find errors you DO care about.eyelidlessness : Insert before
0 comments:
Post a Comment