Sabtu, 17 April 2010

Logic copy

#body>
Text 1 = #input type="text" id="t1" value="hello"/>
#br/>
Text 2 = #input type="text" id="t2"/>
#br/>
#br/>
#input type="button" value="click" onClick="document.getElementById('t2').value=document.getElementById('t1').value"/>
#/body>

Logic date
#body>
#script>
var d=new Date();
a=d.getHours();
b=d.getMinutes();
c=d.getSeconds();

b=check(b);
c=check(c);
function check(i){
if(i#10){
i="0"+i;
}
return i;
}
document.write(a+":"+b+":"+c);
#/script>
#/body>