 <p>i'd really wish this wouldn't be possible, but sadly it is (or was). i don't know for sure if this still works on Win7 and with current browser-versions, but in the past you could do this...</p> <p><strong>Firefox</strong></p> <pre><code>function getUsr() { return Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment).get('USERNAME'); } </code></pre> <p><strong>Internet Explorer</strong></p> <pre><code>function getUsr() { var wshell = new ActiveXObject("WScript.Shell"); return wshell.ExpandEnvironmentStrings("%USERNAME%"); } </code></pre>