获得域用户名称的javascript脚本
2007-08-09 21:36 Koy 阅读(724) 评论(0) 编辑 收藏 举报<script language="javascript" type ="text/javascript">
function setuser(tUsername)
{
var wshNetwork=new ActiveXObject("WScript.Network");
var tUser=document.getElementById(tUsername);
alert(tUsername)
alert(tUser.value);
if(tUser!= "undefine")
{
tUser.value=wshNetwork.UserName;
alert(tUser.value);
}
}
</script>