在网页中如何删除组?
MxDraw网页开发|黄洪辉|2018-06-07 11:45
-
回答:
主要用到函数说明:
_DMxDrawX::DeleteGroup
根据组名,删除组,详细说明如下:
参数 说明 BSTR pszName
组名
js代码实现如下:
var winWidth = 440; var winHeight = 140; var winLeft = (screen.width - winWidth) / 2; var winTop = (screen.height - winHeight) / 2 - 20; var str = 'dialogHeight:' + winHeight + 'px;dialogWidth:' + winWidth + 'px;dialogTop:' + winTop + 'px;dialogLeft:' + winLeft + 'px;resizable:yes;center:yes;status:no;' var rt = window.showModalDialog("Gettext.htm?tmp=" + Math.random(), "输入图层名", str); var txt; if (typeof (rt) == "undefined") { return; } else { var arr = rt.split(","); txt = arr[0]; } mxOcx.DeleteGroup(txt); alert("成功删除组");