Is JavaScript secure?
It's important to make the distinction between Java and JavaScript.

Java is a general purpose programming language and associated runtime originally developed by Sun. Java programs can run inside a browser plug-in. There have been some recent vulnerabilities uncovered, and Apple has taken the step of disabling Java by default.

Javascript is a scripting language used widely on the web to provide all sorts of dynamic behaviour for websites. Like anything, it's never going to be 100% secure, but because it's limited in what it can do (it can modify the behaviour of a webpage, but it can't run arbitrary code on your Mac or modify your files), it's safer than Java.

Javascript is fairly safe to leave on (and it will cripple a lot of sites if you turn it off). If you definitely need Java, then leave it on, but be vigilant about running Software Update so that you get the latest security patches, and consider disabling it if you don't need to access those sites for a while. Disabling it in browsers you don't use for those sites is also a good idea.