[หาได้แล้ว] หา script นับถอยหลังอยู่นะคับ

เริ่มโดย น้องบิ้ว, 30 ธันวาคม 2007, 02:42:31

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

น้องบิ้ว

ผมหาไม่เจอจริงๆครับ จริงๆมันน่าจะหายง่ายๆ 

ผมแค่ต้องการ ให้หน้านี้ แสดงเวลา นับถอยหลัง ตามเวลาที่กำหนด พอนับ 10,9,8....0 แล้วมันจะ redirect ไปหน้าที่เราตั้งไว้

ผมหาเจอแต่โค๊ดเปลี่ยนหน้าตามเวลาที่กำหนดที่นี่คับ ซึ่ง ok คับ แต่มันดันไม่มีแสดงเวลานับถอยหลัง
ตัวอย่าง http://www.codetukyang.com/java/time/preview/precode18.htm
code http://www.codetukyang.com/java/time/code/code18.htm

แร้วหาไปเจอ กระทู้นี้คับ แต่เวลาดัน ไปอยู่ที่ ด้านล้าง bar TT  อยากได้แบบ  ตัวเลขแสดงในเว็บเรยอะคับ  อยากได้ง่ายๆคับ แค่นับถอยหลัง 10.9.8...0  javascript ธรรมดาก็ได้คับ   
http://www.thaiseoboard.com/index.php?topic=13473.0

ขอบคุณล่วงหน้าคับเพื่อนๆ หาไม่เจอจริงๆ TT  :P

น้องบิ้ว

ตอบได้แล้วคับบบ หาเองจนเจอ มั่วเอา

เอาโค๊ดสองอันมาต่อกันคนละโค๊ด ง่ายๆ

ตรงคำอธิบายไม่ต้องก๊อปไปนะ เด๋วใช้งานไม่ได้ อย่าลืมลบระ


<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="240" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="240" height="240">
      <div align="center">wait.</span>
        <form name="counter">
  <div align="center">
    <input type="text" size="5" name="d2" value="">
  </div>
</form>

<div align="center">
  <script>
<!--
//
var milisec=0
var seconds=30   <<< ใส่จำนวนวินาทีนะ
document.counter.d2.value='30'

function display(){
if (milisec<=0){
    milisec=9
    seconds-=1
}
if (seconds<=-1){
    milisec=0
    seconds+=1
}
else
    milisec-=1
    document.counter.d2.value=seconds+"."+milisec
    setTimeout("display()",100)
}
display()
-->
</script>
  <Script Language="JavaScript">
///ตัวเลข 10000 มีค่าเท่ากับ 10 วินาทีครับ
function next()
{
window.location="ใส่ url ที่จะให้เด้งไป"
}
self.setTimeout('next()', 30000)  << แก้เองนะตรงนี้ให้ตรงกับเวลาข้างบน

</Script>
</div></div>
    </td>
  </tr>
</table>
</body>
</html>


chuanguru


MKANDPP

เจ๋งจริงๆเลยครับคุณ น้องบิ้ว ถามเองหาคำตอบเอง จนเจอ  ;)
[direct=http://www.travellerinsure.com]ประกันภัยสำหรับนักเดินทาง[/direct] [direct=http://www.bookbedroom.com]จองห้องพักง่ายๆ[/direct] [direct=http://www.manythaihotel.com]จองห้องพักในไทยง่ายๆ[/direct][direct=http://www.reannork.com]หาข้อมูลเรียนนอกได้ที่นี่[/direct]

สิ่งที่จะทำให้เห็นสันดานคนได้เร็วที่สุดก็คือเงิน

EThaiZone

อะ แถมอีกแบบ ผมไปแงะมาจากเว็บกูแชร์

<script language="JavaScript">
sec=30;
function tplus() {
sec-=1;
document.getElementById("OutputText").innerHTML="<font color=\'red\'>" + sec + " </font> Sec.";
if (sec==0) {
document.getElementById("OutputText").innerHTML="Go!";
document.getElementById("OutputText2").innerHTML="";
window.location.replace("http://เว็บเป้าหมาย");
}
if (sec>0) {setTimeout("tplus()",1000);}
}
setTimeout("tplus()",1000);
</script>

<div align="center" id="OutputText"></div>
<div id="OutputText2">
<div align="center">Please wait...</div>
</div>


ขอบคุณกูแชร์ ถึงแม้เจ้าของเว็บไม่ยอมแชร์ ก็ไปจิ๊กมาแล้ว  ;D

น้องบิ้ว

#5
อ้างถึงจาก: EThaiZone ใน 30 ธันวาคม 2007, 12:10:06
อะ แถมอีกแบบ ผมไปแงะมาจากเว็บกูแชร์

<script language="JavaScript">
sec=30;
function tplus() {
sec-=1;
document.getElementById("OutputText").innerHTML="<font color=\'red\'>" + sec + " </font> Sec.";
if (sec==0) {
document.getElementById("OutputText").innerHTML="Go!";
document.getElementById("OutputText2").innerHTML="";
window.location.replace("http://เว็บเป้าหมาย");
}
if (sec>0) {setTimeout("tplus()",1000);}
}
setTimeout("tplus()",1000);
</script>

<div align="center" id="OutputText"></div>
<div id="OutputText2">
<div align="center">Please wait...</div>
</div>


ขอบคุณกูแชร์ ถึงแม้เจ้าของเว็บไม่ยอมแชร์ ก็ไปจิ๊กมาแล้ว  ;D

555 ท่านแหล่มมากคับบบบ อิอิ นี่แหละที่ต้องการ ขอบคุณอีกครั้งค๊าปปคุณโจ้  :'(

ball6847

ขอบคุร คุณน้องบิ้ว คับ ที่ตั้งกระทู้นี้ กำัลังศึกษาอยุ่พอดี งิงิ
เป็นประโยชน์มากเลย
We use Ubuntu.

[direct=http://ng-seo.sourcelab.xyz/]AngularJS SEO Experimental[/direct]

sakang

ขอบคุณครับกำลังหาอยู่เลย แล้วมีแบบนับเวลาถอยหลังแบบ นับเวลา เหลือเวลาอีก 1:30.00 นาที แล้วนับถอยหลังอะครับ มีไหมครับๆ

melodica


nuttsb

แหล่งรวม โทรทัศน์ ทีวี TV = http://tvhitz.blogspot.com
แหล่งรวม โน๊ตบุ๊ค Notebook = http://notebookhit.blogspot.com
แหล่งรวม กล้อง Camera = http://camerahit.blogspot.com
แหล่งรวม มือถือ Mobile = http://mobilehitz.blogspot.com
แหล่งรวม เกมส์ Games = http://gamehothits.blogspot.com