/// <summary> /// 内部方法,添加表单域元素 /// </summary> /// <param name="e"></param> internal void AppendElement(IHTMLFormElement e) { if (!myElements.Contains((HTMLElement)e)) { myElements.Add(( HTMLElement )e); e.Form = this; } }
/// <summary> /// 添加子元素 /// </summary> /// <param name="e">要添加的子元素对象</param> /// <returns>操作是否成功</returns> public override bool AppendChild(HTMLElement e) { if (myChildNodes.Contains(e)) { return(true); } if (InnerAppendChild(e)) { return(true); } else { if (myParent != null && myParent != this) { myParent.AppendChild(e); } return(false); } }