<script type="text/javascript">
//window.onload = Now;
function Now(){
var n=new Date();
return n.toLocaleDateString();
};
</script>
i put the above code in the head part.
<body onload="Now();">
but on the page, there is no show anything.when i using window.onload = Now or put the script code after the label; the result is the same, why?
ps:i want to write the result out on the page. but when i used document.write(Now()); it still not displayed on the page.