设置焦点

页面加载init()函数:

<body onload="init()">

使id为yesbutton的按钮获得焦点  

<script language ="javascript">  
    function init(){  
    var ctrl=document.getElementById("yesbutton");  
    ctrl.focus();  
    }  
</script>

posted @ 2010-09-06 17:04  罗鹤  阅读(135)  评论(0编辑  收藏  举报