HOWTO: ????? ?????? ?? ??? ???? ??? ??????? ?? VBScript

?????? ????????? ?????? ?????????
???? ???????: 157906 - ??? ???????? ???? ????? ????? ??? ???????.
1.00 1.10 kbhowto kbprg WINDOWS 2.00
????? ???? | ?? ????

?? ??? ??????

??????

???? ??? ??????? ???? ??? ????? ???????? ???? ??? ????? ??? ???????? Visual Basic Scripting Edition.

???? ??? ????? ??????:
  • ????? ??? ????? ?????? HREF ????.
  • ??????? ??? ????? ?????? ??? ?????? ??????? ??????.
  • ?????? ???????? ?? ????? ???? ?? ???? ????? ????.

??????? ????

??? ??? ????? ?????? ????? ?? ???????? ?????. ???? ???? ???? ???? ??? ????? ????? HTML ???? ?? ????? ?? ?? ???. ????? ??????? ??????? ?? ?? ???? ???? ???? ?????? ???????.

??????? 1 - ????? ??? ????? ???????? ??? HREF ??????

???????? ????? 1 ????? ??? ????? ??????? ?? ???? HTTP.
   ******** Begin Page1-1.htm **********
   <HTML>

    <SCRIPT LANGUAGE="VBSCRIPT">
      Sub SetCookie
        document.cookie = "MyVar='101'; path='page1-2.htm'"
      End Sub
    </SCRIPT>
    <BODY>
      <H2>Page 1 - Method 1</H2><HR>
      <INPUT TYPE=BUTTON VALUE="Set Cookie" onClick="SetCookie">
      <A HREF="page1-2.htm">Go to Page 2</A>
    </BODY>

   </HTML>
   ******** End Page1-1.htm **********

   ******** Begin Page1-2.htm **********
   <HTML>

    <SCRIPT LANGUAGE="VBSCRIPT">
      Sub GetCookie
        MsgBox document.cookie
      End Sub
    </SCRIPT>
    <BODY>
      <H2>Page 2 - Method 1</H2><HR>
      <INPUT TYPE=BUTTON VALUE="Get Cookie" onClick="GetCookie">
    </BODY>

   </HTML>
   ******** End Page1-2.htm   **********
				
Page1 - 1.htm:
  • ??? ' onClick ' ???? ????????? ????? ???? SetCookie ??? ?????? ?? ???? ??????.
  • ???? ??????? ?????? ???? ??? ????? ???????? ? PATH ??? ????? ????????. PATH ?? ??? ?????? ???? ??? ????? ??????.
  • ???????? "???????? ??? ?????? 2" ?????? ??? ?????? 2 ???????? HTML ??????? ???? ??????.
Page1 - 2.htm:

  • ??? ' onClick ' ???? ????????? ????? ???? GetCookie ??? ?????? ?? ???? ??????.
  • ???? ??????? ?????? ???? ??? ????? ???????? ??? ??? ????? ???????.

??????? 2 - ??????? ??? ????? ???????? ???????? ????????? ????

??????? ??????? ??????? ????? ??? ????? ??????? ?? ???? HTTP.
   ******** Begin Page2-1.htm **********
   <HTML>

    <SCRIPT LANGUAGE="VBSCRIPT">
      Sub SetCookie
        document.cookie = "MyVar=101"
      End Sub

      Sub GotoNextPage
        location.href = "page2-2.htm"
      End Sub
    </SCRIPT>
    <BODY>
      <H2>Page 1 - Method 2</H2><HR>
      <INPUT TYPE=BUTTON VALUE="Set Cookie" onClick="SetCookie">
      <A HREF="" onClick="GotoNextPage">Go to Page 2</A>
    </BODY>

   </HTML>
   ******** End Page2-1.htm **********

   ******** Begin Page2-2.htm **********
   <HTML>

    <SCRIPT LANGUAGE="VBSCRIPT">
      Sub GetCookie
        MsgBox document.cookie
      End Sub
    </SCRIPT>
    <BODY>
      <H2>Page 2 - Method 2</H2><HR>
      <INPUT TYPE=BUTTON VALUE="Get Cookie" onClick="GetCookie">
    </BODY>

   </HTML>
   ******** End Page2-2.htm **********
				
Page2 - 1.htm:

  • ??? ' onClick ' ???? ????????? ????? ???? SetCookie ??? ?????? ?? ???? ?????.
  • ??????? ?????? ??? ????? ???? ??? ????? ???????? ?? ?????? ???????.
  • ????????? ???????? "???????? ??? ?????? 2" ????? ???? GotoNextPage ??? ?????? ?? ???? ??????.
  • ????? ???? GotoNextPage ????? ??? ?????? 2 ?????? ????? HREF ?? ????? ???? ??????. ??? ???? ?? ?????? ??????? ???? ??? ??? ????? ????? ??? ????? ????????.
Page2 - 2.htm:

  • ??? ' onClick ' ???? ????????? ????? ???? GetCookie ??? ?????? ?? ???? ??????.
  • ???? ??????? ?????? ???? ??? ????? ???????? ??? ??? ????? ???????.

??????? ??????? - ??????? ?????? ?? ????? ???? ?? ?????? ??????? ??????

   ******** Begin Page3-1.htm **********
   <HTML>

    <SCRIPT LANGUAGE="VBSCRIPT">
      Dim MyVar
    </SCRIPT>

    <FRAMESET COLS="50%,50%">
      <FRAME SRC="page3-2.htm">
      <FRAME SRC="page3-3.htm">
    </FRAMESET>

   </HTML>
   ******** End Page3-1.htm **********

   ******** Begin Page3-2.htm **********
   <HTML>

    <SCRIPT LANGUAGE="VBSCRIPT">
      Sub SetVariable
        top.MyVar = 101
      End Sub
    </SCRIPT>
    <BODY>
      <H2>Page 1 - Method 3</H2><HR>
      <INPUT TYPE=BUTTON VALUE="Set Variable" onClick="SetVariable">
    </BODY>
   </HTML>
   ******** End PAGE3-2.HTM **********

   ******** Begin Page3-3.htm **********
   <HTML>

    <SCRIPT LANGUAGE="VBSCRIPT">
      Sub GetVariable
        MsgBox top.MyVar
      End Sub
    </SCRIPT>
    <BODY>
      <H2>Page 2 - Method 3</H2><HR>
      <INPUT TYPE=BUTTON VALUE="Get Variable" onClick="GetVariable">
    </BODY>

   </HTML>
   ******** End Page3-3.htm **********
				
Page3 - 1.htm:

  • ??? ????? ?????. ??? ?? ?? ????? ??????? ???? ?? subroutines, ??? ?? ?????? ??? ???? ???????? ???????.
Page3 - 2.htm:

  • ??? ' onClick ' ???? ????????? ????? ???? SetVariable ??? ?????? ?? ???? ?????.
  • ????? ??????? ?????? ???? ??????? ?? ?????? ??????. ???? ??? ???????? ????? TOP ???? ??? ???? ??????? ??????.
Page3 - 3.htm:

  • ??? ' onClick ' ???? ????????? ????? ???? GetVariable ??? ?????? ?? ???? ??????.
  • ???? ??????? ?????? ???? ??????? ?? ?????? ??????.

?????

?????? ??? ???? ?? ????????? ??? ????? ?????? ???????? ??? ??? ??????? Microsoft Internet Explorer? ?? ?????? ????? Microsoft ??????? ??? ?????:
http://msdn.microsoft.com/ie/

http://support.microsoft.com/iep

???????

???? ???????: 157906 - ????? ??? ??????: 13/???? ??????/1427 - ??????: 3.0
????? ???
  • Visual Basic, Scripting Edition 2.0
  • Microsoft Visual Basic, Scripting Edition 1.1
????? ??????: 
kbmt kbfaq kbhowto kbscript KB157906 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????157906
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com