在你页面的Html中写window的onload事件的脚本,脚本的初始化部分你可以在页面的事件选择中得到,然后:
function window_onload() {
window.document.all("txtID").focus();
                  window.document.all("txtID").value="";
}