JavaScript is a client side technology meaning that the script is actually executed on the person viewing the website. Most web crawlers don't have the same technology that clients do so it's much much safer to stick with pure html in your source code. Obviously I'm not talking about validations as such items, form validations should be both put as a client side validation script as well as a secondary server side.
Basically Google crawler and other search engine crawler can't read that code So webmasters are not using Java script code. If ur link is nor crawler able why u will use Java script...
Spiders can't read Javascripting and will ignore the codings when faced. It does not harm your website's SEO as long as you do not include so much of it. Content wise --> Do not use javascript to generate contents or menu.