Monday, 12 August 2013

External Javascript

external javascript
open new document and write the java script code(functions)
 function validate(login form)
 {
   Same code from previous example
 }
·         same the above document with any name .js as the extension Exampe: check.js
·         to include the external javascript file in the html document we ned to use src attribute of <script> tag.
Syntax: <script type=”text/javascript” src=”chack.js”>
</script>
Note:


It is always recommenteded to write external javascript code because the same code can be used in multiple html documents

No comments:

Post a Comment