网页中显示hyper-v,调用IMsRdpClient8时打印OnDisconnected方法的错误日志的代码

    <!--远程桌面参数设置start-->
    <div style="display:block">
		<div style="height:28px; background-color:#dbeaf9; padding-left:5px; cursor:default;position:relative;">
			<div id="vm_name" style="position:absolute;left:200px;top:0;font-weight:bolder;width:400px;text-align:center;line-height:28px;"></div>
			<button class="button" id="connect" type="button" οnclick="freshs();" style="float:right; margin-top:1px;line-height:20px!important;"></button>
		</div>
	</div>
    <!--远程桌面参数设置end-->
    <div id="connectArea" style="background:#fff;height:600px;width:800px;position:relative;">
        <table border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <object id="MsRdpClient"
                        classid="CLSID:54D38BF7-B1EF-4479-9674-1BD6EA465258"
                        codebase="msrdp.cab#version=5,2,3790,0" width="800px" height="600px" style="display:none;">
                    </object>
                </td>
            </tr>
        </table>
		<div id="disconnect" style="position:absolute;left:45%; top:45%;"></div>
		<script type="text/javascript">
			function MsRdpClient::OnDisconnected(disconnectCode) {
				if(disconnectCode == 2) loadVM(vm_name);
				disconnect();//2308 无法连接 2 关机 3 从连接状态断开
				try{
					extendedDiscReason = MsRdpClient.ExtendedDisconnectReason;
					errMsgText = MsRdpClient.GetErrorDescription(disconnectCode, extendedDiscReason);
					alert(errMsgText);
				}catch(ex){
					alert(ex);
				}
			}
		</script>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值