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

Reply
 
Thread Tools

JavaScript question
Old 24.06.2004, 09:55   #1
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Rep Power: 6
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.
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/

Old 24.06.2004, 09:57   #2
...overwined...
 
noone's Avatar
 
Join Date: 03 2003
Location: ...tortuga...
Posts: 3,429
Rep Power: 5
Default

it should be commented for not to be considered as html for some browsers.
__________________
...let's be gods... let's by ugly...

Old 24.06.2004, 11:43   #3
Волк, просто волк...
 
_ WOLF _'s Avatar
 
Join Date: 07 2002
Location: /dev/null
Age: 80
Posts: 250
Rep Power: 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.
__________________
00000000h: 41 72 61 6D 20 4D 6B 68 69 74 61 72 79 61 6E;

Old 24.06.2004, 12:48   #4
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Rep Power: 6
Default

thanks for the explanations, buddies!
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
Reply




Реклама:
реклама
Buy text link .

All times are GMT. The time now is 05:39.
Top

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