Javascript language is not seo friendly, because I have read that links created via javascript are not (or cannot be) indexed or counted by search engines.
why?... search engine cant understand the script?..but most of the sites used javascripts..and it has high page rank and keyword position???
if you have some thing that you don;t want to crawl it by search engines spider keep it in java script.............SE never crawl javascript.......................
I dont believe that sentence "Search engine's ignore JS codes". Do not make light of Google. It developed itself for many years and it's able to appreciate JS codes if it contains important things such as links etc. But it's definitely a better way to link with HTML. I mean, as diyakapoor said, you shouldn't use JS unless it's really required.
Ensure JavaScript is search engine friendly. Use with caution and make sure spiders are able to index JavaScript-driven content (e.g. links for popup windows, JavaScript rollover navigation, etc.) from collaborint.com/resources/seo/search_engine_friendly_website.asp