已知 html元素 HtmlElement he;
求 元素he所在表单的name,既he所在的form表单的名称。
求 元素he所在表单的name,既he所在的form表单的名称。
解决方案 »
- cookies 记住密码
- c# PropertyGrid修改集合的简单问题
- 100分求救:正则表达式,<tr>嵌套获取内容
- 在textBox中遇叹号和空格换行
- 程序员必备的第11种工具。Spdevelop个人免费版,集成数据库建模软件,基于模板引擎的代码生成工具.
- 为什么两个变量指向同一地址了
- 我的数据库为什么更新不了啊 求大神帮我看看到底哪里出错了
- 在将dataGrid的数据expet到excel中的问题!!
- 求救:.NET SDK快速入门示例数据库在xp下不能装?
- CefSharp.BrowserSubprocess 已停止工作”,如何解决
- TEXTBOX.COPY TEXTBOX.CUT TEXTBOX.PASTE
- C#中一次打印多张图片如何解决,高手帮忙
window.document.getElementById("123").parentNode
{
HtmlElement heParent = he.Parent;
string tagName = heParent.TagName.ToUpper();
if (tagName == "BODY" || tagName = "HTML") return null;
if (tagName == "FORM" || tagName == "IFRAME") return heParent;
return GetHtmlElementParentForm(heParent);
}
window.document.forms来获取:)
不用脱我裤衩了...我来脱你的吧...分给我:D
但在html代码里查看这个FORM的Name明明为form,
即<FORM name="form" action=".....">......</FORM>
try this
function getfather(xx)
{
//window.alert('ok');
if(xx.parentNode!=null)
{
window.alert(xx.parentNode.nodeName);
getfather(xx.parentNode);
}
}