2011年10月18日星期二

UGG Austrila navigator Properties documentation

navigator attribute documentation 2010-12-20 13:38 navigator contains the version of Navigator in use information.
Navigator 2.0 Navigator 3.0: added mimeTypes and plugins properties; added javaEnabled and taintEnabled methods.
Navigator 4.0: added a language and platform properties; added preference methods.
create source JavaScript client runtime engine automatically creates the navigator object.
describe the use of the navigator object to determine your users are using the version of Navigator, the Navigator user can control the MIME type, the user has installed plug-ins. All of these attributes are read-only navigator.
property appCodeName specify the name of the browser code string.
Example The following example shows the value of the property appCodeName:
Example The following example shows the value of the appName property:
document.write (. appName)
for Navigator 2.0 and 3.0, this statement will display the following text:
navigator.appName value is NetscapeappVersion Navigator version information specified string.
properties described appVersion version information specified in the following format:
releaseNumber (platform; country)
This format contains the following values:
releaseNumber is Navigator version number. For example, platform is a platform to run Navigator. For example, country for the international version is Relative to the local version of the international version, the stronger the encryption. Example 1 The following example will show Navigator version information:
run on Windows NT for the Navigator 3.0, will display the following information:
navigator.appVersion value is 3.0 (WinNT, I)
Example 2 The following example will separate each line with a newline character to fill the Textarea object. Because the newline character will be based on different platforms and different, example test appVersion property determines whether users are running Windows (appVersion for all versions of Windows, it contains If you're running Windows, line breaks will be set to r n; otherwise set to n, which is for the Unix and Macintosh.
SCRIPT var newline = null function populate (textareaObject) {
if (navigator.appVersion.lastIndexOf ('Win')!=- 1)
newline = newline = FORM NAME = (document.form1.testLines)
describe the value of language is usually two-letter code, such as
Use this property to determine customers to use language versions of Navigator, you may want to show different users in different languages ​​translation of the text.
mimeTypes a client contains all the array of supported MIME types.
mimeTypes array contains the client-side support for each MIME type (in fact, this is a helper application or plug-in implementation). For example, if a client supports three MIME types,UGG Austrila, these MIME types will be reflected in the navigator.mimeTypes [0], navigator.mimeTypes [1], and navigator.mimeTypes [2] in.
mimeTypes every element of the array is a MimeType object.
platform marked Navigator compiled machine type.
describe Platform values ​​may be Win32, Win16, Mac68k, MacPPC and a variety of Unix.
Since version differences, emulators or other reasons, Navigator according to the different types of machines will have a compiled version of access.
If you use SmartUpdate to the user's machine to download the software, you can download to use this feature to ensure that the trigger is the corresponding JAR file. Trigger property page will be checked before checking the platform version of Navigator. For more information on using SmartUpdate, see the JAR Installation Manager for SmartUpdate.
plugins contains all client-side plug-ins currently installed array.
use the array can refer the client to install a Plugin object. each element of the plugins array is a Plugin object. For example, if three plug-ins installed on the client, the three plug-in will be mapped to navigator.plugins [0], navigator.plugins [1] and navigator.plugins [2].
To use the plugins array: < br> 1.navigator.plugins [index]
2.navigator.plugins [index] [mimeTypeIndex]
index is a client installed plug-in that order of integer, or a Plugin object that contains the name (can be be found from the name attribute) of the string. The first format is stored in the plugins array will return the location specified in the Plugin object. The second format will return the object in the Plugin MimeType object.
To get the client the number of installed plug-ins, you can use the length property: navigator.plugins.length.
plugins.refresh: plugins array has its own method, refresh. This method will make the newly installed plug-ins available, updates related arrays such as the plugins array, and optionally reloads open documents contain plug-ins. You can use the following statement to call the method:
navigator.plugins.refresh (true)
navigator.plugins.refresh (false)
true if you give it, refresh to make the newly installed plug-in available at the same time, re-load all contain embedded objects (EMBED tag) document. If you have given false, then the method will only refresh the plugins array, but not reload any documents.
When users install the plug, the plug will not be available unless the call refresh, or the user to close and restart the Navigator.
The following code refreshes arrays and reloads the document contains embedded object:
userAgent string that the client sends to the server from the HTTP protocol user agent header values.
describe the server uses to send the user agent header to identify the value of the customer.
Example The following example will show the Navigator userAgent information:
describe it if you allow Java, javaEnabled will return true; otherwise returns false. Users can set the parameters of the user preference to enable or disable Java.
The following code will allow the case of Java implementation function1; otherwise perform function2.
preference allows the identification of the script to get and set certain Navigator preferences.
describe this method will return the value of the preferences. If you use this method to set the value, then return the new value.
security preferences using the preference method requires UniversalPreferencesRead read permissions. Use this method to set the first option requires UniversalPreferencesWrite permission.
To obtain information on security in Navigator 4.0 for more detailed information,UGG Austrila, see
In the case of permission, you can get and set are listed in Table 8.2 the first option.
taintEnabled specify whether data tainting.
syntax navigator.taintEnabled () describes the stain to avoid passing top-secret scripts, and other private information, such as directory structures or user browsing history. JavaScript can not proceed without the end user permission to send to any server with a tainted value.
taintEnabled can determine whether data tainting. If data tainting is enabled, then,UGG Austrila, taintEnabled will return true, otherwise returns false. Users can enable or disable the environment variable NS_ENABLE_TAINT data tainting.
The following code will allow the stain is performed with data function1; otherwise perform function2.

没有评论:

发表评论