HTML + PHP + CSS + JS

001 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
002 <html xmlns="http://www.w3.org/1999/xhtml">
003 <head>
004 <title>Embedded syntax test</title>
005 
006     <!-- JS Snippet -->
007     <script language="JavaScript">
008     // init color to red
009     function start () {
010        document.getElementById ('status').style.color = 'red';
011        window.setTimeout ('changeStatus ()', 3 * 1000);
012     }
013 
014     // change color to green
015     function changeStatus () {
016        document.getElementById ('status').firstChild.data = 'Fertig!';
017        document.getElementById ('status').style.color = 'green';
018     }
019     </script>
020 
021     <!-- CSS Snippet -->
022     <style type="text/css">
023     <![CDATA[
024           body { background-color:#fff5ee; }
025           p    { color:#000000; font-size:12pt; font-family:'Courier New'; }
026     ]]>
027     </style>
028 </head>
029 <body onload="start()">
030 <h1>Some HTML code...</h1>
031 <span id="status">JavaScript Playground</span>
032 
033 <!-- PHP Snippet -->
034 <?php if (eregi( "^de.*" ,$_SERVER['HTTP_ACCEPT_LANGUAGE']  )){  ?>
035      <p>Deutscher Text</p>
036 <?php } else { ?>
037      <p>English text</p>
038 <?php } ?>
039 
040 </body>
041 </html>

html_css_php.txt · Last modified: 2012/06/18 21:33 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0