Jump to content
php.lv forumi

parrymason

Reģistrētie lietotāji
  • Posts

    31
  • Joined

  • Last visited

Posts posted by parrymason

  1. <html>
    <title>Pulkstenis</title>
    <head>
    <script LANGUAGE="JavaScript">
    <!--
    function showFilled(Value) {
     return (Value > 9) ? "" + Value : "0" + Value;
    }
    function StartClock24() {
     TheTime = new Date;
     document.clock.showTime.value = showFilled(TheTime.getHours()) + ":" + showFilled(TheTime.getMinutes()) + ":" + showFilled(TheTime.getSeconds());
     setTimeout("StartClock24()",1000)
    }
    //-->
    </script>
    <style type="text/css">
    <!--
    .input { border-style: none;
            font-family:Verdana,Arial,Helvetica,sans-serif;
     font-size:8pt
    }
    -->
    </style>
    </head>
    <BODY bgcolor="#FFFFFF" onLoad="StartClock24()">
    <center>
     <br>
     <br>
     <u><font face="Arial, Helvetica, sans-serif" size="4">Pulkstenis</font></u><br>
     <br>
     <br>
     </font> 
     <form name=clock>
     <input type=text name=showTime size=8 class=input>
     </form>
    </center>
    </body>
    </html>

  2. es panākt ātri ;)

     

    <?php

    $bildes=10;

    echo '<img alt="" src="bilde_'.rand(0,$bildes).'.jpg" />';

    ?>

     

    bildes nosaukt kā bilde_1.jpg, bilde_2.jpg...

    12362[/snapback]

     

    Labs, es pamēģināju, bet bija gadījumi, kad neparādās neviena bilde. Aizvietoju

    rand(0,$bildes)

    ar

    rand(1,$bildes)

    un viss iet.

×
×
  • Create New...