<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
        <script type="text/javascript">
        function $(id){
            return document.getElementById(id);
        }
        
        var remain =10;
        function init(){
            $("btn").innerHTML = "提交("+(remain--)+"秒)";
            if(remain>0){
                window.setTimeout(init,1000);
            }
            else{
                $("btn").disabled = false;
                $("btn").innerHTML = "提交";
            }    
        }
        </script>
    </head>
    <body onload="init()">
        <button id="btn" disabled="false" >提交</button>
    </body>
</html>延时按钮的代码 ,其中 function $(id){
            return document.getElementById(id);
        } 谁解释下 函数$(id)的作用 这样写没见过