Hello
How can store this code in a file js and call div#id?
I dont want call this code with input#id. I want call this code with div#id.
What is your suggestion?

Code JavaScript:
<script type="text/javascript">
            var int=self.setInterval("clock()",1000);
            function clock()
            {
            var d=new Date();
            var t=d.toLocaleTimeString();
            document.getElementById("clock").value=t;
            }
        </script>