Faid's Blog™
Welcome to my blog!
My Blog Menu
Recent
C++ File Encryptor
VB6 File Renamer (Hide/Lock your Data)
Simple Bootstrap 3.3.7 Sidebar Navigation
Article
2020
September
C++ File Encryptor
2018
September
VB6 File Renamer (Hide/Lock your Data)
April
Simple Bootstrap 3.3.7 Sidebar Navigation
2017
January
HTML Javascript Classic Calculator
Solution to Y2K38 bug in 32-bit PHP
July
Crash Bandicoot PSX 100% Save Game
2015
April
Know HTML for Beginner
ASCII to Binary (8-bit) Converter
Penghitung Jarak & Waktu VB6
Permainan Angka HTML Javascript
March
Kode Warna HTML
Efek Transisi CSS (Transition Effect CSS)
Jam Analog Tanpa Gambar (Analog Clock Without Image) HTML
Offline Javascript Obfucator
2014
August
Magnetic Piston (Free Energy and no Pollution Engine)
2013
October
10 Komponen Dalam Mothrboard
2012
December
Kalender Jawa Javascript
VB6 Folder Locker
November
Pembilang Angka (Number to Text)
Simple Javascript Date Calculator
Simple Text Counter
HTML TextArea OnFocus OnBlur
Jejaring sosial muncul, Email pun tersingkirkan
October
Arabic Keyboard (Keyboard Arab)
Membuat Folder Locker dari HTA (HTML Application)
7 Situs URL Shortener (Penyingkat URL)
August
Make Folder Locker from HTA (HTML Application)
July
Membuat Folder Locker dari Visual Basic Script (VBS)
Make Folder Locker with Visual Basic Script (VBS)
Cara Mendapatkan Chip Zynga Poker Gratis
Februari
Kata-Kata yang membuat Anda diam 1000 bahasa
Test Psikologi Cinta Terbaru
Make your own "Folder Locker" without any software
Cara membuat "Folder Locker" tanpa software
Label
Bahasa
Bootstrap
CMD
CSS
Folder Lock
Game
HTML
Javascript
Pengetahuan
Programming
PHP
Script
VB6
VBS
About
Facebook
Twitter
Monday, November 5, 2012
Simple JavaScript Date Calculator
TO
Save this code into "*.HTA" extension (ex. "DateCalc.hta"):
<table align='center' cellspacing='2px'><tr> <td align='left' id='dd1'></td><td id='mm1'></td><td id='yy1'></td> <td><div style='font-family:arial;font-weight:bold;font-size:12pt'>TO</div></td> <td id='dd2'></td><td id='mm2'></td><td align='right' id='yy2'></td> <tr><td colspan='7'><input type='text' ReadOnly style='width:100%;' id='result' value='Total 0 day(s)'> </td></tr></table> <script language='JavaScript'> var e="getElementById" var h="innerHTML" var i="selectedIndex" build("d",1,31); build("m",1,12); build("y",1900,2099); var dt=new(Date); d1[i]=(dt.getDate()-1); m1[i]=dt.getMonth(); y1[i]=(dt.getFullYear()-1900); d2[i]=d1[i];m2[i]=m1[i];y2[i]=y1[i]; function count(){ from=new Date((y1[i]+1900),m1[i],(d1[i]+1)); to=new Date((y2[i]+1900),m2[i],(d2[i]+1)); result.value="Total "+Math.round((to-from)/(1000*60*60*24))+" day(s)";} function build(n,c,w){ var bdy="onchange='count()'>"; while(c<=w){bdy=bdy+"<option>"+c+"</option>";c=(c+1)}; document[e](n+n+"1")[h]="<select id='"+n+"1' "+bdy+"</select>"; document[e](n+n+"2")[h]="<select id='"+n+"2' "+bdy+"</select>";} </script>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment