Automatic Filling of web forms (gmail as an example) _ Javascript tutorial

Source: Internet
Author: User
Javascript: Automatic Filling of web forms (gmail as an example), Javascript tutorial

The following is a reference clip:
Var ie = WScript. createobject ("InternetExplorer. Application ");
Var args = WScript. arguments;
Var followme = http://www.Google.com /;
If (args. length> 0)
{
Followme + = args (0 );
}
Ie. Navigate ("https://www.Google.com/accounts/Login? Continue = "+ followme );
SynchronizeIE ();
Var doc=ie.doc ument;
Doc. forms [0]. Email. value = "lixianmin@gmail.com ";
Doc. forms [0]. Passwd. value = "password written here ";
// This is because the PersistentCookie checkbox sometimes exists and sometimes does not exist.
If (doc. forms [0]. PersistentCookie! = Null)
{
Doc. forms [0]. PersistentCookie. checked = false;
}
Doc. forms [0]. submit ();
SynchronizeIE ();
Ie. Visible = true;
// Wait until the IE operation ends.
Function SynchronizeIE ()
{
While (ie. Busy)
{
WScript. Sleep (100 );
}
}


Assume that the file is saved as googleSpecific. js and stored in the % windir % \ system32 path. Create a Google. bat file with the following content and put it in the % windir % \ system32 path.

@ Cls

@ Wscript % windir % \ system32 \ GoogleSpecific. js % 1% 2% 3% 4% 5% 6% 7% 9

Then, run go mail in the command line to log on to your gmail.

Similar Commands include:

Go notebook à notebook

Http://flappy.cnblogs.com/archive/2006/07/09/446673.HTML

Go bookmarkà favorites

If you directly enter go without receiving any content, you will log on to the google.com homepage in your name. In addition, Google specific.jsit is best to use screnc.exe for encryption. The encrypted file format is. jse, but even so, the password in the file cannot be seen by others (scrdec can be decrypted ). For better confidentiality, please give your comments.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.