/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
>>> from spidermonkey import Runtime >>> >>> rt = Runtime() >>> cx = rt.new_context() >>> >>> print cx.eval_script('navigator.appCodeName;') Mozilla >>> print cx.eval_script('navigator.appName;') Netscape >>> print cx.eval_script('navigator.appVersion;') 5.0 (Macintosh; en-US) >>> print cx.eval_script('navigator.cookieEnabled;') 0 >>> print cx.eval_script('navigator.language;') en-US >>> print cx.eval_script('navigator.mimeTypes;') None >>> print cx.eval_script('navigator.platform;') MacIntel >>> print cx.eval_script('navigator.plugins;') None >>> print cx.eval_script('navigator.systemLanguage;') undefined >>> print cx.eval_script('navigator.userAgent;') Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3 >>> print cx.eval_script('navigator.userLanguage;') en-ca >>> print cx.eval_script('navigator.javaEnabled();') 0
URL: http://blackcodeseo.com/python-spidermonkey-navigator/