01.
<html>
02.
<head>
03.
<title>ThaiCreate.Com Ajax Tutorial</title>
04.
</head>
05.
<script language=
"javascript"
>
06.
function
fncAlert()
07.
{
08.
setTimeout(
"alert('Welcome To www.ThaiCreate.Com')"
,5000)
09.
10.
11.
}
12.
13.
function
fncAlertTime()
14.
{
15.
setTimeout(
"fncDisplyTime();"
,1000)
16.
}
17.
function
fncDisplyTime()
18.
{
19.
mySpan.innerHTML =
new
Date();
20.
fncAlertTime();
21.
}
22.
</script>
23.
<body Onload=
"JavaScript:fncAlertTime();"
>
24.
<span id=
"mySpan"
></span>
25.
<br>
26.
<input name=
"btnButton"
id=
"btnButton"
type=
"button"
value=
"Click"
onClick=
"JavaScript:fncAlert();"
>
27.
</body>
28.
</html>