ďťż

JavaScript problem

       

Podstrony


telcocafe

Mam taki skrypt na stronie, który wyświetla platforme i nazwe systemu operacyjnego:
<script language=Javascript> <!--HIDE document.write(navigator.platform+"<br>"); if (is_vms) document.write("VMS") else if (is_bsd) document.write("BSD Unix") else if (is_freebsd) document.write("FreeBSD Unix") else if (is_sinix) document.write("Sinix") else if (is_unixware) document.write("SCO Unixware") else if (is_sco) document.write("SCO Unix") else if (is_linux) document.write("Linux") else if (is_aix4) document.write("IBM AIX 4") else if (is_aix3) document.write("IBM AIX 3") else if (is_aix2) document.write("IBM AIX 2") else if (is_aix1) document.write("IBM AIX 1") else if (is_aix) document.write("IBM AIX") else if (is_hpux10) document.write("HP UX 10") else if (is_hpux9) document.write("HP UX 9") else if (is_hpux) document.write("HP UX") else if (is_irix6) document.write("Irix 6") else if (is_irix5) document.write("Irix 5") else if (is_irix) document.write("Irix") else if (is_suni86) document.write("Sun Solaris i86") else if (is_sun5) document.write("Sun Solaris 5") else if (is_sun4) document.write("Sun Solaris 4") else if (is_sun) document.write("Sun Solaris") else if (is_macppc) document.write("Apple Macintosh PowerPC") else if (is_mac68k) document.write("Apple Macintosh 68K") else if (is_mac) document.write("Apple Macintosh") else if (is_os2) document.write("OS/2") else if (is_winxp) document.write("Microsoft Windows XP") else if (is_win2k) document.write("Microsoft Windows 2000") else if (is_winnt) document.write("Microsoft Windows NT") else if (is_winme) document.write("Microsoft Windows ME") else if (is_win95) document.write("Microsoft Windows 95") else if (is_win31) document.write("Microsoft Windows 3.1") else if (is_win) document.write("Microsoft Windows") else document.write("?"); //--> </SCRIPT>
I jest problem bo wyświetla mi tylko platforme (Win32), i przeglądarka wyświetla błąd:
Wiersz: 471
Znak: 1
Bład: Brak definicji 'is_vms'
Wcześniej działało dobrze. Prosze o pomoc.



Ciekawe jak dobrze działało...
btw nie masz zadeklarowanych is_vms, is_bsd itd.
var is_vms, is_bsd; // itd

ale to i tak ci nic nie da raczej - w ogóle ten kod jakiś dziwny...

IMO skopiowałeś skądś kod, ale nie w całości.


(...) ale to i tak ci nic nie da raczej - w ogóle ten kod jakiś dziwny...



Już znalazłem, to jest cały skrypt:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0020)http://showmyip.com/ --> <HTML><HEAD><TITLE>IP Address properties of 172.17.10.9 --> showmyip.com <-- part of our "Privacy Ecosystem"</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1250"> <META content="IP Address properties of your Internet Connection" name=DESCRIPTION> <META content="IP Address, ip addresses, ip address properties, ip address property, Adresse IP, Dirección IP, IP, IP-adress, my ip address, show my ip, show my ip address, showmyip, ip organization, ip org, find my ip address, find my ip, find ip address, find ip, ipconfig, Lookup IP, Lookup IP Address, ip address ISP, ISP ip address, Privacy Ecosystem, winipcfg, XML IP address, SOAP IP address, RSS IP address, VXML, VoiceXML, internet protocol address, tcpip, tcp/ip, dynamic IP address, dynamic DNS, ddns, cual es mi ip, mi ip, ver mi ip, IP-adressegenskaper, wie ist meine IP-adresse, IP address ISP, Lookup ISP, Internet Service Provider (ISP), propriĂŠtĂŠs d'adresses IP, votre connexion Internet, IP Adresse Ihres Internet-AnschluĂźes, proxy address, proxy server, anonymous proxy, proxy ip address, wi-fi, wifi, wlan, wireless, hotspot, hotspots, wireless hotspot, hotspot location, hotspot locations, wireless access point, wireless access " name=KEYWORDS> <META http-equiv=refresh content=1800;URL=http://www.showmyip.com/> <META content=General name=RATING> <META content=index,follow name=ROBOTS> <META content="3 days" name=REVISIT-AFTER><LINK title="IP Address properties of your Internet Connection" href="http://www.showmyip.com/rss.php" type=application/rss+xml rel=alternate> <script language=Javascript src="IP Address properties of 172_17_10_9 -- showmyip_com -- part of our Privacy Ecosystem_pliki/datefunctions.js" type=text/javascript></SCRIPT> <script language=Javascript src="IP Address properties of 172_17_10_9 -- showmyip_com -- part of our Privacy Ecosystem_pliki/browserfunctions.js" type=text/javascript></SCRIPT> <script language=Javascript src="IP Address properties of 172_17_10_9 -- showmyip_com -- part of our Privacy Ecosystem_pliki/misc.js" type=text/javascript></SCRIPT> <STYLE type=text/css>.glossary_table { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #f4ead9; TEXT-ALIGN: left } .glossary_table TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #f4ead9; TEXT-ALIGN: left } .glossary_table TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #f4ead9; TEXT-ALIGN: left } </STYLE> <STYLE type=text/css>.glossary_tablec { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #f4ead9; TEXT-ALIGN: center } .glossary_tablec TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #f4ead9; TEXT-ALIGN: center } .glossary_tablec TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #f4ead9; TEXT-ALIGN: center } </STYLE> <STYLE type=text/css>.glossary_left { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .glossary_left TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .glossary_left TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } </STYLE> <STYLE type=text/css>.glossary_leftc { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } .glossary_leftc TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } .glossary_leftc TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } </STYLE> <STYLE type=text/css>.glossary_heading { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .glossary_heading TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .glossary_heading TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } </STYLE> <STYLE type=text/css>.style_20b { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .style_20b TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .style_20b TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: black; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } </STYLE> <STYLE type=text/css>.style_20 { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: #808080; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .style_20 TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: #808080; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } .style_20 TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: top; COLOR: #808080; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: left } </STYLE> <STYLE type=text/css>.style_20r { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: red; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } .style_20r TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: red; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } .style_20r TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: red; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } </STYLE> <STYLE type=text/css>.style_20bc { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: blue; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } .style_20bc TD { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: blue; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } .style_20bc TH { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; COLOR: blue; TEXT-INDENT: 0px; PADDING-TOP: 4px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center } </STYLE> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY> <TABLE cellSpacing=1 cols=3 width="16%" border=1 id="table2">  <TR borderColor=#f4ead9 WIDTH="100%">    <TD class=glossary_left>      <script language=Javascript> <!--HIDE document.write(navigator.platform+"<br>"); if (is_vms) document.write("VMS") else if (is_bsd) document.write("BSD Unix") else if (is_freebsd) document.write("FreeBSD Unix") else if (is_sinix) document.write("Sinix") else if (is_unixware) document.write("SCO Unixware") else if (is_sco) document.write("SCO Unix") else if (is_linux) document.write("Linux") else if (is_aix4) document.write("IBM AIX 4") else if (is_aix3) document.write("IBM AIX 3") else if (is_aix2) document.write("IBM AIX 2") else if (is_aix1) document.write("IBM AIX 1") else if (is_aix) document.write("IBM AIX") else if (is_hpux10) document.write("HP UX 10") else if (is_hpux9) document.write("HP UX 9") else if (is_hpux) document.write("HP UX") else if (is_irix6) document.write("Irix 6") else if (is_irix5) document.write("Irix 5") else if (is_irix) document.write("Irix") else if (is_suni86) document.write("Sun Solaris i86") else if (is_sun5) document.write("Sun Solaris 5") else if (is_sun4) document.write("Sun Solaris 4") else if (is_sun) document.write("Sun Solaris") else if (is_macppc) document.write("Apple Macintosh PowerPC") else if (is_mac68k) document.write("Apple Macintosh 68K") else if (is_mac) document.write("Apple Macintosh") else if (is_os2) document.write("OS/2") else if (is_winxp) document.write("Microsoft Windows XP") else if (is_win2k) document.write("Microsoft Windows 2000") else if (is_winnt) document.write("Microsoft Windows NT") else if (is_winme) document.write("Microsoft Windows ME") else if (is_win95) document.write("Microsoft Windows 95") else if (is_win31) document.write("Microsoft Windows 3.1") else if (is_win) document.write("Microsoft Windows") else document.write("?"); //--> </SCRIPT>      <NOSCRIPT>not available, or not enabled... </NOSCRIPT></TD></TR>  </TABLE> </BODY></HTML>
A da się go jakoś przerobić żeby było bez tej ramki i na czarnym tle? A może znacie jakieś inne skrypty, które wyświetlają nazwe systemu?

Bo jak kopiuje to co jest między <head> a </head> do head na swojej stronie i co między <body> a <body> do body to wyświetla tylko "Win32" :kwasny:

jakbys zauwazyl, do pliku dolaczane sa zewnetrzne pliki skryptow...
<script language=Javascript src="IP Address properties of 172_17_10_9 -- showmyip_com -- part of our Privacy Ecosystem_pliki/datefunctions.js" type=text/javascript></SCRIPT> <script language=Javascript src="IP Address properties of 172_17_10_9 -- showmyip_com -- part of our Privacy Ecosystem_pliki/browserfunctions.js" type=text/javascript></SCRIPT> <script language=Javascript src="IP Address properties of 172_17_10_9 -- showmyip_com -- part of our Privacy Ecosystem_pliki/misc.js" type=text/javascript></SCRIPT>

wez od podstaw napisz sobie funkcje rozpoznajaca platforme.. google pomoze... ;)

PS uzywaj [ codebox ][ /codebox]-ow ;)

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • nvm.keep.pl

  • Sitedesign by AltusUmbrae.