Sub GuessANumber
   Dim Guess, RndNum
   RndNum = Int((100) * Rnd(1) + 1)
   Guess = CInt(InputBox("Enter your guess:",,0))
   Do
      If Eval("Guess = RndNum") Then
         MsgBox "祝贺你!猜对了!"
         Exit Sub
      Else
         Guess = CInt(InputBox("对不起,请再试一次",,0))
      End If
   Loop Until Guess = 0
End Sub

解决方案 »

  1.   

    <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New Document </title>
    <meta name="Generator" content="EditPlus">
    <meta name="Author" content="">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    </head>
    <script language=javascript>
    function testformload(id)
    {
    test(id)
    }
    </script>
    <script language=vbscript>
    Sub test(id)
    Dim divid
    divid = Eval(id)
    divid.style.display = "none"
    End Sub
    </script>
    <body>
    <form name=form1>
    <div id="001">aaa</div>
    <div id="002">bbb</div>
    <select name=sel id=sel onchange="testformload(form1.sel.value)">
    <option value=001>001</option>
    <option value=002>002</option>
    </select>
    </form>
    </body>
    </html>提示我divid缺少对象
      

  2.   

    我记得最接近的是 CallByName