Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 24.06.2004, 10:55   #1
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Downloads: 0
Uploads: 0
Reputation: 18 | 5
Default JavaScript question

PHP Code:
<script Language="JavaScript1.3">
<!--
  function 
JSVer(){
    return 
"1.3"
    
}
//-->
</SCRIPT> 

could anybody tell me the reason why the script code placed into <!-- --> ?

I've tried to run the function without that symbols:

PHP Code:
<script Language="JavaScript1.3">
  function 
JSVer(){
    return 
"1.3"
    
}
</SCRIPT> 
and all went fine.
Reply With Quote
Old 24.06.2004, 10:57   #2
...overwined...
 
noone's Avatar
 
Join Date: 03 2003
Location: ...tortuga...
Posts: 3,429
Downloads: 3
Uploads: 0
Reputation: 158 | 3
Default

it should be commented for not to be considered as html for some browsers.
Reply With Quote
Old 24.06.2004, 12:43   #3
Волк, просто волк...
 
_ WOLF _'s Avatar
 
Join Date: 07 2002
Location: /dev/null
Age: 72
Posts: 250
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

some browsers doesn't support JS or CSS.
That's why u must include your JS code into comments and then that kind of browsers will ignore JS code parsing.
Reply With Quote
Old 24.06.2004, 13:48   #4
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Downloads: 0
Uploads: 0
Reputation: 18 | 5
Default

thanks for the explanations, buddies!
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 17:31.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.