عالي مستواه عضو نشيط
عدد المساهمات : 30 التَقْيم : 0 تاريخ التسجيل : 25/06/2009
| موضوع: كود كم تبقى لشهر رمضان ؟؟؟؟ 28.08.09 21:23 | |
| هلا وغلا ...جايبه لكم اليوم كود كم تبقى من شهر رمضان ؟؟؟ يارب يعجبكم الكود بصيغة html - اقتباس :
< =Java1.2>function setcountdown(theyear,themonth,theday){yr=theyear;mo=themonth;da=theday }setcountdown(2008,08,31) var occasion="تبقى على دخول شهر رمضان الكريم " var message_on_occasion="هنيئاً للجميع على دخول رمضان جعلنا الله من صوّامه وقوّامه " var countdownwidth='480px' var countdownheight='25px' var countdownbgcolor='#ffffff' var opens='"0" width="400" id="myexample" style="border:3px solid blue">"simplified arabic" size=4 color="#000000">' var closes=' | ' var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") var crosscount='' function start_countdown(){if (.layers).countdownnsmain.visibility="show" else if (.all||.getElementById) crosscount=.getElementById&&!.all?.getElementById("countdownie") : countdownie countdown()} if (.all||.getElementById) .write('[color=#000080]"countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'">') onload=start_countdown function countdown(){ var today=new Date() var todayy=today.getYear() if (todayy < 1000) todayy+=1900 var todaym=today.getMonth() var todayd=today.getDate() var todayh=today.getHours() var todaymin=today.getMinutes() var todaysec=today.getSeconds() var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec futurestring=montharray[mo-1]+" "+da+", "+yr dd=Date.parse(futurestring)-Date.parse(todaystring) dday=Math.floor(dd/(60*60*1000*23)*1) dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1) dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1) if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){ if (.layers){.countdownnsmain..countdownnssub..write(opens+message_on_occasion+closes) .countdownnsmain..countdownnssub..close() }else if (.all||.getElementById) crosscount.innerHTML=opens+message_on_occasion+closes return}else if (dday<=-1){if (.layers){.countdownnsmain..countdownnssub..write(opens+"هنيئاً للجميععلى دخول عيد الفطر."+closes) .countdownnsmain..countdownnssub..close()}else if (.all||.getElementById) crosscount.innerHTML=opens+"عيدكم مبارك "+closes return}else{if (.layers){.countdownnsmain..countdownnssub..write(opens+occasion +dday+ " يوم و "+dhour+" ساعة و "+dmin+" دقيقة و "+dsec+" ثانية "+closes) .countdownnsmain..countdownnssub..close()}else if (.all||.getElementById) crosscount.innerHTML=opens+occasion +dday+ " يوم و "+dhour+" ساعة و "+dmin+" دقيقة و "+dsec+" ثانية "+closes }setTimeout("countdown()",1000)}> < ="Java1.2">
> | |
|