[英]How to fetch the current logged-in user name from the application without using ActiveX control?
I have a unified desktop web application from where I need to fetch the username of the logged-in user and need to place it in any custom UI. 我有一个统一的桌面Web应用程序,我需要从中获取登录用户的用户名,并需要将其放在任何自定义UI中。 The application needs to be opened din IE 11. ActiveX settings are disabled as kept for security reasons.. 应用程序需要在IE 11中打开。出于安全原因,ActiveX设置被禁用。
Kindly suggest any alternative approach which will fulfil the requirement. 请建议任何符合要求的替代方法。 Any help would be appreciable. 任何帮助都会很明显。
Thanks in advance... 提前致谢...
<script type="text/javascript">
var WinNetwork = new ActiveXObject("WScript.Network");
alert(WinNetwork.UserName);
</script>
This is how to do it in JavaScript for IE11 这是如何在JavaScript for IE11中做到这一点
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.