asp.net a small example of assigning the return value of js to the asp.net control
- 2020-05-27 04:45:00
- OfStack
<script language ="javascript" type ="text/javascript">
var second=0;
var minute=0;
var hour=0;
window .setInterval ("OnlineStayTimes();",1000);
function OnlineStayTimes()
{
second ++;
if(second ==60){second =0;minute +=1;}
if(minute ==60){minute =0;hour +=1;}
var tm=hour+" hours "+minute +" minutes "+second +" seconds "
document.getElementById ("time").innerHTML=tm;
}
</script>
document.getElementById ("time").innerHTML =tm; "time" in label is id of label, so you can display the online time!