You are currently browsing the category archive for the 'JavaScript's' category.

Hi friends, today’s I want to share a JavaScript’s program. Actually few days ago I started reading JavaScript’s. I found that JavaScript’s is very essential for web programming. JavaScript’s add dynamic things to a program.
Here I give a JavaScript’s code using date object. I use some build in JavaScript’s function. Here I created a clock using JavaScript’s. Here the code for a digital clock. You can use the clock in your website. The code is very simple to understand. The clock gives you hours, minutes, seconds and A.M and P.M. So guys lets check it out.

<HEAD>
<script type=”text/javascript”>

<!–
function startclock()
{
var time=new Date();var hours=time.getHours();
var mins=time.getMinutes();
var sec=time.getSeconds();
var AandP=” “;

if (hours>=12)
AandP=”P.M.”;
else
AandP=”A.M.”;

if (hours>=13)
hours-=12;

if (hours==0)
hours=12;

if (sec<10)
sec=”0″+sec;

if (mins<10)
mins=”0″+mins;

document.clock.clockspot.value=hours+”:”+mins+”:”+sec+” “+AandP;

setTimeout(’startclock()’,1000);

} //–>
</script>
</HEAD>

<BODY onLoad=”startclock()”>
<FORM name=”clock”>
Current Time: <INPUT TYPE=”text” name=”clockspot”>
</FORM>
</BODY>

To run this code just copy the code and paste it.  Open to your browser. And enjoy JavaScript’s.

WELLCOME

Hi, I’m saeed Ahmed. Study in computer science & engineering at Rajshahi University of engineering & Technology. I enjoy programming; recently I work on web applications. Please feel free to share and suggest me your good thoughts. Email me: saeedmail@yahoo.com

 

November 2009
S S M T W T F
« Aug    
 123456
78910111213
14151617181920
21222324252627
282930  

My Linkedin Profile

FOLLOW ME ON TWITTER :)

Categories

Archives

Blog Stats

  • 11,715 hits

Some Moment Can't Never Forget

Image013

profile

5493_1195770810448_1113791260_30638811_5916842_n

5493_1195767570367_1113791260_30638805_6606845_n

amre dhakkay sob agune pheltace

rokib guru, emon ganju, me & rasel ghoti

More Photos