Every webmaster has experienced the need to create XHTML compliant web pages. If you are a web designer with clients I'm sure you've heard it many times from your clients who demand to have their web pages built this way. How do we make a page that contains DHTML scripts to be XHTML compliant? This is not a dificult process as you will see if you're reading this till the end.
There are two easy and short ways of doing this possible.
We can also use another version, both of these wrappers will work:
2: Another way of doing this is to remove the script from the page and store it in a .js file which will be called by our page like in the example from bellow:
//A comment here
In this example "thescript.js" is the script itself stored into an external .js file (minus the surroundig "SCRIPT" tags. Comments within the script tags are still allowed.