移除自身

Object(parent).removeChild(this);

if(parent!=null)

{

  parent.removeChild(this);

}

原文地址:https://www.cnblogs.com/602147629/p/1933197.html