Jump to content

phpQv3.0

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by phpQv3.0

  1. You need to put all of your body's content in a div "wrapper" and text-align/align it to center. That is the best way to do this.
  2. The script gets the initial day and time from your computer. Then it uses setTimeout to create a timing event that update the text in your div every 1/2 a second. The DIV tag does not matter; as long as whatever element you want to display the time in; has an id of txt and the element is capable of displaying content in it; then you could use any element. you could just do something like this: <script type="text/javascript"> function startTime() { var today=new Date(); var h=today.getHours(); var m=today.getMinutes(); var s=today.getSeconds(); // add a zero in front of numbers<10 m=checkTime(m); s=checkTime(s); document.getElementById('txt').innerHTML=h+":"+m+":"+s; t=setTimeout('startTime()',500); } function checkTime(i) { if (i<10) { i="0" + i; } return i; } </script> </head> <body onload="startTime()"> <table> <tr> <td id="txt"></td> </tr> </table> or if you don't want to take up any space at all in your page; I suggest using a span, like so: <span id="txt"></span>
  3. You could do something like this: <script language="javascript"> var content = "yourDIVsIDHere"; // replace this with your div's id; the div that contains your external page, that was loaded by ajax function resetDIV() { document.getElementById(content).innerHTML; } </script> <div id="yourDIVsIDHere"> <!-- external page would have been displayed here --> </div> <br><br> <input type="button" onclick="resetDIV()" value="Clear It!">
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.