what we do with java script? means what's the role of java in making a site.is this better to use java script in a site...does it have any effect on the site or the site become more attractive????
1) it's one word, camelBacked: JavaScript. 2) it has absolutely NOTHING to do with Java. See the joke in my signature, "JavaScript is to Java as Hamburger is to Ham." - A back room deal between Sun and Netscape back in the late 90's is responsible for them sharing the name despite being two independently developed and unrelated languages. TECHNICALLY we're not even supposed to be calling it JavaScript anymore, as the most recent is called ECMAScript, but since that doesn't exactly roll off the tongue people still use the older name. Likewise as JavaScript was trademarked to Nyetscape and Java was a trademark of Sun (Now Oracle) Microsoft doesn't call their implementation that. On IE it's called 'JScript' -- and while it's MOSTLY compatible, there are intentional differences to prevent any lawsuits. 3) JavaScript is for adding 'behaviors' to site elements - enhancing the browser and page. It allows you to have genuine client side programming on a page. IMHO it should be used with an eye-dropper -- most people seem to think it needs to be used with a cement truck. As much as scripting can 'enhance' a page, it can -- when used improperly -- suck down bandwidth for nothing useful, use three or four times the code to do CSS' job, make pages take longer to load, introduce 'behaviors' that actually get in the way of the user actually finding what they came for, and take a piss on accessibility from so far up you'd think the lord almighty just got back from a kegger.