C
coolflag
Unregistered / Unconfirmed
GUEST, unregistred user!
<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该怎么描述呢?
我是写在一个按钮里的script event中的onclick
var WshNetwork = new ActiveXObject("WScript.Network");
document.writeln("Domain = " + WshNetwork.UserDomain);
document.writeln("Computer Name = " + WshNetwork.ComputerName);
document.writeln("User Name = " + WshNetwork.UserName);
没有具体的提示,只看到浏览器左下脚有script error的字样,而且是在点按钮后出现的,页面并不提示错误!你可以试试!!我不知道怎么搞定!
{
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该怎么描述呢?
我是写在一个按钮里的script event中的onclick
var WshNetwork = new ActiveXObject("WScript.Network");
document.writeln("Domain = " + WshNetwork.UserDomain);
document.writeln("Computer Name = " + WshNetwork.ComputerName);
document.writeln("User Name = " + WshNetwork.UserName);
没有具体的提示,只看到浏览器左下脚有script error的字样,而且是在点按钮后出现的,页面并不提示错误!你可以试试!!我不知道怎么搞定!