开发者

Getting a value from an iFrame in asp.net

开发者_Go百科

I have an asp.net web app that is using an iFrame (called "fraContent") within the aspx page. In the iFrame, I have a hidden field (called "hdnCounter") that stores a "counter" value.

From the parent aspx page, how can I access that hidden value from the iFrame?

alert(document.getElementById('window.fraContent.hdnCounter').value); does not seem to work


The ID of the element is not window.fraContent.hdnCounter, so getElementById will not work.

You simply want: alert(window.fraContent.document.getElementById('hdnCounter').value)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜