2011-04-08 37 views

回答

1
var element = document.activeElement;//gets selected element 
if(element.tagName === "INPUT"){ 
    element.value = new Date().toUTCString();//changes text in input element to today's date 
} 
相關問題