[英]Get parent formname on child window using jquery?
i have below form tag on parent page from which i open a popup. 我在父页面上有下面的表单标签,我从中打开一个弹出窗口。 i want to get form Name attribute value(ie "cust-100" ) on popup screen 我想在弹出屏幕上获取表单名称属性值(即“ cust-100”)
<form action="/custAction" formName="cust-100">
i tried below 我在下面尝试
self.opener.document.$('[name="formName"]').val()
but it gives error self.opener.document.$('[name="formName"]').val()
但给出错误
TypeError: self.opener.document.$ is not a function
您没有用于窗体控制的val(),请尝试使用html()函数。
val = $(window.parent.document).find('form').attr("formName");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.