将下面的代码保存为一个HTM文件:
WorldClient Login JavaScript Plugin Script Read Me File
WorldClient Login JavaScript Plugin Script ReadMe File
This WorldClient Login JavaScript Plugin script is made available 'as is,'
it implies no warranties and in no way removes the responsiblity of
using such scripts from the administrator of the site using it.
That being said, this script is
- Light weight
- Cross Platform
- Customizable
- Intuitive
- Should be showing up below this on the page
Features
The WorldClient Login JavaScript Plugin script allows you to add to any page a login to your WorldClient server.
It also allows the user, through the use of cookies to login with the click of a link after they have set the cookie.
If the user is concerned with cookies, a cookie is not necasary, or the cookie can be removed by clicking on the "Forget Me" link once the cookie has been set.
Set up
Setting up the plug-in and using it is as simple as opening up the WC_Login.js file with a text editor and changing a few simple variables.
Once those variables have been set you will need to add the following line of code to any page that you wish to add the login panel to.
Script Setting Variables
wcURL - The URL to the WorldClient server and its DLL.
Example: 'http:\/\/localhost:3000/WorldClient.dll?View=Main'
Note Remember to escape the correct characters and to add the "?View=Main" to the URL or you will get errors.
WCDate - The number of days until the cookie should expire.
For example 30 would set the cookie for 30 days from the point of logging into the account.
WCpath - Setting the path limits the directories that the cookie will be accessible to on your web server.
WCdomain - The domain to which this cookie belongs, i.e. '.altn.com'
WCsecure - Set to true to require a secure connection
WorldClient Login Plug-in CSS variables
WCtableWidth - The Cascading Stylesheet setting for the width of the WorldClient table.
Examples: '120px','20%' or '5cm'
WCFont - The name of the font that you wish to use in the login panel.
Example: 'tahoma'
WCborder - The CSS Border setting for the login panel.
Example: '2px dotted navy', '0px none' or '5px inset'
WCBannerColor - The color of the header that says 'WorldClient'.
Example:'gold'
WCBannerTextColor - The color of the text for the header that says 'WorldClient'.
Example:'black'