- Joined
- Feb 8, 2008
- Messages
- 1
- Reaction score
- 0
Dear,
I have a Javascript in myfunctions.js file and i want to access functions written in myfunctions.js file to my asp.net code.and also i wants to store the output of startTime() function to a lable control text property.
the following is the java script
<script type="text/javascript">
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
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>
please help
I have a Javascript in myfunctions.js file and i want to access functions written in myfunctions.js file to my asp.net code.and also i wants to store the output of startTime() function to a lable control text property.
the following is the java script
<script type="text/javascript">
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
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>
please help