kleiner klickcounter

Bloged in Code Snippets von melistik Montag September 18, 2006
PHP:
  1. $fp = fopen("count.txt","r");
  2. $count = fread ($fp, filesize ("count.txt"));
  3. fclose($fp);
  4. //zählerstand um eins erhöhen
  5. $count++;
  6. $fp = fopen("count.txt","w");
  7. // wird in die count.txt eingeschrieben
  8. fwrite($fp, $count);
  9. fclose($fp);
  10. echo "Load $count times";

selektierte seitenauswahl aufgrund der auflösung

Bloged in Code Snippets von melistik Montag September 18, 2006
JavaScript:
  1. <script language="JavaScript1.2">
  2. <!--
  3. if (screen.width==800||screen.height==600)
  4. window.location.replace("http://www.domain.de/index800.html")
  5. else if (screen.width==640||screen.height==480)
  6. window.location.replace("http://www.domain.de/index640.html")
  7. else if (screen.width==1024||screen.height==768)
  8. window.location.replace("http://www.domain.de/index1024.html")
  9. else if (screen.width==1280||screen.height==1024)
  10. window.location.replace("http://www.domain.de/index1280.html")
  11. else
  12. window.location.replace("http://www.domain.de/indexHigh.html")
  13. //-->
  14. </script>
  15.  
  16. //nach gewisser zeit schließen
  17.  
  18. <script LANGUAGE="JavaScript">setTimeout("self.close();",
  19. 400);</script>
  20.  
  21. //auf dropdown menu bild anzeigen
  22.  
  23. <select size="1" name="icons"
  24. onchange="document.icon.src=this.options[this.options.selectedIndex].value+'.gi
  25. f';">
  26. <option selected value="kein">kein</option>
  27.  
  28. <img name="icon"src="kein.gif" width="33" height="33"
  29. border="0">

fullscreen der seite erzwingen

Bloged in Code Snippets von melistik Montag September 18, 2006
HTML:
  1. <title>mmhh</title>
  2.  
  3. <script language="JavaScript1.2"><!--
  4. function fullScreen() {
  5. moveTo(0,0);
  6. if (document.layers) {
  7. self.outerWidth=screen.width;
  8. self.outerHeight=screen.height;
  9. }
  10. if (document.all) {
  11. resizeTo(screen.width, screen.height);
  12. }
  13. }
  14. //--></script>
  15. </head>
  16. <body onLoad="fullScreen();">
  17. </body>
  18. </html>

neue Fenstergröße bestimmen

Bloged in Code Snippets von melistik Montag September 18, 2006
HTML:
  1. <a href="datei.html"
  2. target="neuesfenster"
  3. onclick="window.open('','neuesfenster','top=50,screenX=50,left=100,screenY=100,
  4. height=200,width=200')">
  5. Linktext</a>

css - bild wird beim hovern grau

Bloged in Code Snippets von melistik Montag September 18, 2006
HTML:
  1. .machen { }
  2. a:Hover .machen {filter: gray();}
  3. </STYLE>
  4. </head>
  5.  
  6. <BODY BGCOLOR = "#FFFFFF">
  7. <A HREF="#"><IMG CLASS="machen" SRC="52.jpg"
  8. BORDER="0"></A>
  9.  
  10. </BODY>
  11. </HTML>

17 queries. 0.368 seconds.
Powered by WordPress