HTML häufig benutzt

Physik, Mathematik & Programmierung
Benutzeravatar
Yukterez
Administrator
Beiträge: 148
Registriert: Mi 21. Okt 2015, 02:16

HTML häufig benutzt

Beitragvon Yukterez » Do 29. Okt 2015, 20:26

Grundgerüst

Code: Alles auswählen

<html>
    <head>
        <title>..................</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <link rel="shortcut icon" href="http://yukterez.net/favicon.ico">
    </head>
    <body>
       ..................
    </body>
</html>


Fixer Hintergrund

Code: Alles auswählen

<body style="background-image: url(bg.jpg);
 background-attachment:fixed;">


Automatische Weiterleitung

Code: Alles auswählen

<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=http://...........">


Position Div

Code: Alles auswählen

<div style="position:absolute; top:0px; left:0px">


Fixed Div

Code: Alles auswählen

<div style="position: fixed; right:0; bottom:0; display:block; ">


Center Div

Code: Alles auswählen

<div style="position:absolute; top:10px; left:0px; width: 100%; margin: 0 auto; text-align:center; margin-bottom: 0px;">


Center Table

Code: Alles auswählen

<table border="0" cellpadding="0" cellspacing="0"
  width="100%" height="100%">
<tr><td align="center" valign="middle">
...
</td></tr></table>


Passwort

Code: Alles auswählen

<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-41223213-1', 'ist.org');
  ga('send', 'pageview');

</script>

<html><head><title>Login</title>

<script type="text/javascript">
var Eingabe = window.prompt("Bitte geben Sie das Passwort ein", "");
switch (Eingabe) {
  case "PASSWORT1":
    location.href = "LINK1.html";
    break;
  case "PASSWORT2":
    location.href = "LINK2.html";
    break;
  default:
    alert("Falsches Passwort");
    break;
}
</script>

</head><body onload="Geheim()">
</body></html>


Image Restore

Code: Alles auswählen

<body background="image.jpg" onLoad="MM_preloadImages('1.gif','2.gif')">

Code: Alles auswählen

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

Code: Alles auswählen

<a target="_blank" href="http://" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('xyz','','abc.gif',1)"><img src="def.gif" name="xyz" title="____" border="0"></a>


Anzeigen nach Laden

Code: Alles auswählen

<body onload="hideLoadingLayer();">
 <div style="display:none;" id="hide_loading_site" style="position:absolute;z-index:1000;width:100%;height:100%;background-color:#ffffff;left:0;top:0;">wird geladen...</div>
 <script type="text/javascript">
   <!--
   document.getElementById('hide_loading_site').style.display = 'block';
   function hideLoadingLayer() {
     document.getElementById('hide_loading_site').style.display = 'none';
   }
   //-->
  </script>

[...deine seite...]

</body>


Rotation

Code: Alles auswählen

<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Rotation</title>
 
  <style type='text/css'>
    #navz {
    margin: 0px;
    width: 187px;
    height: 245px;
    background: #f00  url("http://org.yukterez.net/refirector3.gif");
    -webkit-animation-name: spin;
    -webkit-animation-duration: 40000ms;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    -moz-animation-name: spin;
    -moz-animation-duration: 40000ms;
    -moz-animation-iteration-count: infinite;
    -moz-animation-timing-function: linear;
    -ms-animation-name: spin;
    -ms-animation-duration: 40000ms;
    -ms-animation-iteration-count: infinite;
    -ms-animation-timing-function: linear;
   
    animation-name: spin;
    animation-duration: 40000ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
@-ms-keyframes spin {
    from { -ms-transform: rotate(0deg); }
    to { -ms-transform: rotate(360deg); }
}
@-moz-keyframes spin {
    from { -moz-transform: rotate(0deg); }
    to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}
  </style>
 
<script type='text/javascript'>//<![CDATA[
window.onload=function(){

}//]]>

</script>

</head>
<body bgcolor="#0000ff">
<div id=navz style="position:absolute; top:100px; left:400px"></div>
 
</body>
</html>



Link Decoration

Code: Alles auswählen

<a style="text-decoration:none">


Floating Position

Code: Alles auswählen

<script type="text/javascript">

/*
Floating Menu script-  Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/

//Enter "frombottom" or "fromtop"
var verticalpos="fromtop"

if (!document.layers)
document.write('</div>')

function JSFX_FloatTopDiv()
{
   var startX = 3,
   startY = 3;
   var ns = (navigator.appName.indexOf("Netscape") != -1);
   var d = document;
   function ml(id)
   {
      var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
      if(d.layers)el.style=el;
      el.sP=function(x,y){this.style.left=x;this.style.top=y;};
      el.x = startX;
      if (verticalpos=="fromtop")
      el.y = startY;
      else{
      el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
      el.y -= startY;
      }
      return el;
   }
   window.stayTopLeft=function()
   {
      if (verticalpos=="fromtop"){
      var pY = ns ? pageYOffset : document.body.scrollTop;
      ftlObj.y += (pY + startY - ftlObj.y)/8;
      }
      else{
      var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
      ftlObj.y += (pY - startY - ftlObj.y)/8;
      }
      ftlObj.sP(ftlObj.x, ftlObj.y);
      setTimeout("stayTopLeft()", 10);
   }
   ftlObj = ml("divStayTopLeft");
   stayTopLeft();
}
JSFX_FloatTopDiv();
</script>

<script>
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>

Code: Alles auswählen

<layer id="divStayTopLeft">
<!-- Inhalt -->
</layer>


Pop Up

Code: Alles auswählen

<a href="#" onClick="window.open('http://LINK','NAME','resizable,height=200,width=400').focus();">
<img border="0" src="http://BILD.JPG" title="TITEL">
</a>
<noscript>
<a href="http://LINK" target="_blank">
<img border="0" src="http://BILD.JPG">
</a>
</noscript>

Code: Alles auswählen

<a href="javascript:void(0);" onclick='javascript:window.open ("images/case/sc656.jpg", "selectproduct", "width=500,height=390,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no,location=no,direction=no");'>BEZEICHNUNG</a>


Zufallsgenerator

Code: Alles auswählen

<html>

<script language="JavaScript">
<!--
var r_text = new Array ();
r_text[0] = "Text 1";
r_text[1] = "Text 2";
r_text[2] = "Text 3";
r_text[3] = "Text 4";
r_text[4] = "Text 5";
r_text[5] = "Text 6";
r_text[6] = "Text 7";
var i = Math.floor(7*Math.random())
document.write(r_text[i]);
//-->
</script>

</html>

Code: Alles auswählen

<html>

<script language="JavaScript">
<!--
var r_text = new Array ();
r_text[0] = "<embed src=patriot.mp3 width=1 height=1 controller=false autostart=true>";
r_text[1] = "<embed src=supreme.mp3 width=1 height=1 controller=false autostart=true>";
r_text[2] = "<embed src=welcome.mp3 width=1 height=1 controller=false autostart=true>";
r_text[3] = "<embed src=general.mp3 width=1 height=1 controller=false autostart=true>";
r_text[4] = "<embed src=party.mp3 width=1 height=1 controller=false autostart=true>";
var i = Math.floor(5*Math.random())
document.write(r_text[i]);
//-->
</script>

</html>


Frage und Antwort

Code: Alles auswählen

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<?php

// Zuerst eine Session starten
session_start();
// standardmaessig ist der Test nicht bestanden.
$_SESSION['test'] = "falsch";

// * Configuration - i.e: 'edit me'.

// Zuerst alle Fragen definieren
$questions_alle = array(
'<small><small><br><br></small></small>10+6/3',
'<small><small><br><br></small></small>Wieviele Dimensionen hat die Raumzeit ?',
'<small><small><br><br></small></small>x^4=16. Wie viel ist 4^(x/2) ?',
'<small><small><br><br></small></small>Die Kubikwurzel aus 343 ? (Hint: ?^3=343)',
'<small><small><br><br></small></small>Sie rollen ein Rad mit 8.12 cm Durchmesser vor sich her. Wie viele Umdrehungen macht das Rad (ganzzahlig gerundet), wenn Sie es 100 m weit rollen?',
'<small><small><br><br></small></small>Sie haben auf der Erde ein Objekt von 100kg. Wieviele kg h&auml;tte dieses am Saturn,<br>wenn dieser halb so schwer w&auml;re wie der Mond?',
'<small><small><br><br></small></small>Bei einer Verlosung gewinnt jedes zweite Los. Sie kaufen 4 Lose. Wieviele Hundertstel eines Prozent betr&auml;gt die Wahrscheinlichkeit, dass Sie dennoch nichts gewinnen?',
'<small><small><br><br></small></small>Nennen Sie den 2er Log von 4294967296 (Hint: 2^?=4294967296)',
'<small><small><br><br></small></small>Die vierte Potenz von x ist 16. Wie viel ist 4^(2*x) ?',         
'<small><small><br><br></small></small>log<sub><sub>2</sub></sub>(512) (Hint: 2^?=512)',
'<small><small><br><br></small></small>Die Kubikwurzel aus 512 (&sup3;&radic;512)',
'<small><small><br><br></small></small>x^4=16. Wie viel ist (x/2)^4 ?'   
            );

// Array fuer die 3 gewaehlten Fragen vorbereiten
$questions = array('','','','','');
               
// alle Antworten definieren
$answers_alle   = array('12','4','4','7','392','100','625','32','256','9','8','1');
$answers_alle_2   = array('12','vier','4','7','392','100kg','625','32','256','9','8','1');

// array fue die 3 gewaehlten Antworten
$answers   = array('', '', '');
$answers_2   = array('', '', '');

$frage1 = rand(0,11);

// while-schleife, damit frage2 <> frage1 ist
$frage2 = rand(0,11);

while($frage2 == $frage1)
{
  $frage2 = rand(0,11);
}

$frage3 = rand(0,11);
while($frage3 == $frage1 or $frage3 == $frage2)
{
  $frage3 = rand(0,11);
}

// die Fragen zuweisen
$questions[0] = $questions_alle[$frage1];
$questions[1] = $questions_alle[$frage2];
$questions[2] = $questions_alle[$frage3];

// die Antworten zuweisen
$answers[0] = $answers_alle[$frage1];
$answers[1] = $answers_alle[$frage2];
$answers[2] = $answers_alle[$frage3];

$correct_link = "http://yukterez.net/forum/ucp.php?mode=register";
$false_link   = "http://yukterez.net/org/depp.html";

// * DO NOT EDIT BEYOND THIS PART.
// * Unless you know what you're doing.

// Check if a button was pressed.
if(isset($_POST['submit'])) {
   if($_POST['answer0'] == "" || $_POST['answer1'] == "" || $_POST['answer2'] == "")
      return; // Check if everything's put in.  If not: quit handlin'.
      
   $responses = array($_POST['answer0'],$_POST['answer1'],$_POST['answer2']);

   // die richtigen Antworten an Hand der uebermittelten Fragenummern auslesen
   $answers[0] = $answers_alle[$_POST['f1']];
   $answers[1] = $answers_alle[$_POST['f2']];
   $answers[2] = $answers_alle[$_POST['f3']];

   $answers_2[0] = $answers_alle_2[$_POST['f1']];
   $answers_2[1] = $answers_alle_2[$_POST['f2']];
   $answers_2[2] = $answers_alle_2[$_POST['f3']];
                  
   // Now, check the answers.

   $fehler = 0;   // Flag fuer Fehler
   for($i = 0; $i < sizeof($answers); $i++)
   {
         if($answers[$i] != $responses[$i])
         {
            if($answers_2[$i] != $responses[$i])
            {
                $datei = "deppenprotokoll.txt";
               $fp = fopen($datei,"a+");
               if ($fehler == 0)
               {
                  // beim ersten Fehler die Ich-P Adresse ausgeben
                  // zzgl. Datum / Uhrzeit
                  fwrite($fp,$_SERVER['REMOTE_ADDR']);
                  fwrite($fp,"\n");
                  $timestamp = time();
                  $datum = date("d.m.Y",$timestamp);
                  $uhrzeit = date("H:i",$timestamp);
                  fwrite($fp,$datum);
                  fwrite($fp," - ");
                  fwrite($fp,$uhrzeit);
                  fwrite($fp,"\n");
               }
               $fehler = 1;
               fwrite($fp,"Frage: ");
               if ($i == 0)
               {
                  fwrite($fp,$questions_alle[$_POST['f1']]);
               }
               if ($i == 1)
               {
                  fwrite($fp,$questions_alle[$_POST['f2']]);
               }
               if ($i == 2)
               {
                  fwrite($fp,$questions_alle[$_POST['f3']]);
               }


               fwrite($fp," Antwort: ");
               fwrite($fp,$responses[$i]);
               fwrite($fp,"\n");
               fclose($fp);
            }
         }
   }
   if ($fehler == 1)
   {
      $datei = "deppenprotokoll.txt";
      $fp = fopen($datei,"a+");
      fwrite($fp,"-----------------------------\n");
      fclose($fp);
      echo "Grober Unfug. Sie k&ouml;nnen nicht einmal rechnen. Verheerend !";
      echo "<script type='text/JavaScript'>
      window.location = \"". $false_link . "\";
      </script>";
      return;    // Oops, seems we've got a bad apple!
   }

   $_SESSION['test'] = "wahr";
   
   echo "Willkommen auf Yukterez.net";
//   header('Location: ' . $correct_link);
   echo "<script type='text/JavaScript'>
         window.location = \"" . $correct_link . "\";
        </script>";
   return true;   // return, we don't need to see the form again :D.
}

?>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<head>
    <style type="text/css">
    body {
       
       padding-left: 100px;
       
    }
    </style>
</head>
<body bgcolor="#e9e8e7" background="bg1g.gif" alink="#888888" vlink="#888888" link="#888888">
</p><title>Registrierung im Forum</title>
<font color=#51575C size=4 face=verdana>Spambot- und Deppensicherung. &#160; &#160;<a href="#hilfe">Hilfe</a></font>
<div style="max-width:800px;">
<font color=#030506 face=Arial><p><small>
<i>Dieses Formular soll die Registrierung von ungeladenen G&auml;sten erschweren. Antworten auf ganze Zahlen gerundet<br>
bzw. in Kleinbuchstaben eingeben. Kontakt: yukterez&copy;gmx.net</i> / <i>bei Problemen:</i> <a href="register.php">andere Fragen versuchen</a>.</small></p></font>

   <form method='POST'>
      <table>
            <tr>
               <td><?=$questions[0]; ?></td>
            </tr>
            <tr>
               <td><input value='Eingabefeld' type='text' name='answer0' /></td>
               <td><input value='<?= $frage1 ?>' type='hidden' name='f1' /></td>
            </tr>
            <tr>
               <td><?=$questions[1]; ?></td>
            </tr>
            <tr>
               <td><input value='Eingabefeld' type='text' name='answer1' /></td>
               <td><input value='<?= $frage2 ?>' type='hidden' name='f2' /></td>
            </tr>
            <tr>
               <td><?=$questions[2]; ?></td>
            </tr>
            <tr>
               <td><input value='Eingabefeld' type='text' name='answer2' /></td>
               <td><input value='<?= $frage3 ?>' type='hidden' name='f3' /></td>
            </tr>

            <td colspan=2>
               <center><input type='submit' name='submit' value='Absenden' /></center>
            </td>
         </tr>
      </table>
   </form>

   </div>
   
   <div style="position:absolute; top:381px; left:58px" id="hilfe"><iframe width="520" height="360" src="http://web2.0calc.com/widgets/horizontal/" scrolling="no" style="border: 1px solid #silver; ">
</iframe>
<br /></a></div>

<div style="position:absolute; top:381px; left:586px"><form action="textarea.htm"><textarea style="width: 200px; height: 362px;"> </textarea></form></div>

<div style="position:absolute; top:-200px; left:0px; width: 100%; margin: 0 auto; text-align:right; margin-bottom: 0px;"><a id="935869" href="http://www.gratis-besucherzaehler.de"> </a><script type="text/javascript" language="JavaScript" src="http://www.gratis-besucherzaehler.net/counter_js.php?account=935869&style=6"></script></div>

</body>
</html>

Code: Alles auswählen

<!-- in der Datei includes/functions.php: -->
'U_REGISTER'         => "http://link.html",


Unicode Sonderzeichen

Code: Alles auswählen

. . . .⍩⍨⍟⎆⎉⎙⎊⎌⏏⚝⇲⇱→↓←↑↖↗↘↙↪↯↹↺↻⇅⇄⇇⇈⇉⇊⇋⇌⇒⇐⇓⇑⇜⇝⇪⇶↔⇜⇝⇠⇡⇢⇣⇪↔☜☞☟☝☯⌚∠␛⎋„“
♀♂✯✲✽✾❅❆❇❪❫❬❭卐✠☭✡☮✌❤☺☹☻ツ∴☁☂★☆☇☈☎☑☒ ☼☾♻⚇⚒⚕⚖☠☢☣☧☨☪✪■□▣▤▥▦▧▨▩▭▯▮▰▱▲△▴▵◇◈
☀◉◍◎●◐◑◒◓◔◕◖◗◘◙◢◣◤◥◧◨◩◪◫◬◭◮◰◴◵◶◷◸◹◺◻◼◽◾█
∥⊥‰÷≤≥≠≈×·√∂♫∅∞≈∈∋∉∏∑∞∝ƒ∫ȑȓŕ
‾±⁻₋⁺₊⁼₌ⁱⁿªₐₑₒₓ⁰₀¹₁²₂³₃⁴₄⁵₅⁶₆⁷₇⁸₈⁹₉⁽₍⁾₎ℎℏ⅛¼⅓⅜½⅝⅔¾⅞


Mehr: BB-Codes
Симон Тыран @ wikipedia | stackexchange | wolfram

Zurück zu „Yukterez Notizblock“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast