View Full Version : JavaScript Language Level

06-11-2003, 06:17 PM
I can pick up the JavaScript Version like this:

<script language="JavaScript1.0">JSver='1.0'</script>
<script language="JavaScript1.1">JSver='1.1'</script>
<script language="JavaScript1.2">JSver='1.2'</script>
<script language="JavaScript1.3">JSver='1.3'</script>

And I can get the browser level and try to keep up on the association between that and the JS version.

What I'd like to do is to pick up the current language as a string from within a script. Does anyone know how? Thank you.

06-12-2003, 02:46 AM
just a question... why would you want to know the javascript version... the only thing I could think of would be to make scripts compatible with multiple browsers, but thats a cheesy unrealiable way to do it since browsers arnt going on some kind of one specific javascript version standard, getting the browser name/version is better since with that you can look up on the internet or in books which things work and how they work on each browser... or easier might be detecting if certain things work (such as if(document.all)). ... And i am pretty sure there is no way to detect the version within the script, ud have to do it the way ur doing it

06-12-2003, 04:57 PM
look here http://www.javascriptkit.com/javatutors/languageattri.shtml

06-13-2003, 08:01 AM
This might help?


06-16-2003, 06:22 PM
Skyzyx, your page was exactly what I was looking for. Thank you.