主要用到函数说明:
_DMxDrawX::CustomEventParam
得到用户自定义事件的参数。
js代码实现如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <script> function CustomEvent(sEventName) { if (sEventName == "Mx_UpdateDisplay" ) { // 视区更新 // alert("Mx_UpdateDisplay"); var eventParam = document.getElementById( "MxDrawXCtrl1" ).CustomEventParam(); if (eventParam.AtLong(0) == 1) { alert( "更新显示缓存" ); } } } document.getElementById( "MxDrawXCtrl1" ).ImplementCustomEvent = CustomEvent; </script> |