<input   id= "cbChapter_0 "   name= "cbChapter "   type= "checkbox "   value= "1 "> <span> 第一章 </span> 
        <input   id= "cbChapter_1 "   name= "cbChapter "   type= "checkbox "   value= "2 "> <span> 第二章 </span> 
        <input   onclick= "FindCheckBox(); "   type= "button "   value= "click   me   "   /> 
        <script> 我的程序如下
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
objExplorer.document.getelementsByTagName("cbChapter").item(0).focus到底哪里出错了??帮忙看看

解决方案 »

  1.   

    document.getElementById("ID名称").focus();
      

  2.   

    可能的原因有2
    1 focus 你没加括号2objExplorer.document.getelementsByTagName("cbChapter").item(0) 所指向的对象不是你期望的对象
      

  3.   

    ---------------------------
    Windows Script Host
    ---------------------------
    字符: 1
    错误: 缺少对象: 'objExplorer.document.getelementsByTagName(...).item(...)'
    代码: 800A01A8
    源:  Microsoft VBScript 运行时错误---------------------------
    确定   
    ---------------------------上面是提示这个错误
    FOCUS我加了()也一样的
    二楼的document.getElementById("ID名称").focus()是行的,但我需要指定使用NAME,因为有些网页没有ID的劳烦各位,谢了
      

  4.   

    document.getElementsByName("名称")[0].focus();
      

  5.   

    你用的那个方法标签的名称,你应该写objExplorer.document.getelementsByTagName("input").item(0).focus();