<script language= "JScript ">
{
var WshNetwork = new ActiveXObject( "WScript.Network ");
document.writeln( "Domain = " + WshNetwork.UserDomain);
document.writeln( "Computer Name = " + WshNetwork.ComputerName);
document.writeln( "User Name = " + WshNetwork.UserName);
}
</script> 或者下面这个
<script language=javascript>
var WshShell =new ActiveXObject( "WScript.Shell ");
alert(WshShell.ExpandEnvironmentStrings( "%COMPUTERNAME% "));
alert(WshShell.ExpandEnvironmentStrings( "%USERNAME% "));
</script>
应该写成这样吗?我发现是第一句错了:var WshNetwork = new ActiveXObject( "WScript.Network ");
intraweb中不能用到ActiveXObject吗?
alert都正常显示!用java要修改Iwedit1.text该怎么描述呢?
|