将iframe的控制值返回到aspx页面 [英] getting control values of iframe back to aspx page

查看:103
本文介绍了将iframe的控制值返回到aspx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

谁能解决我下面提到的问题... !!!

我在页面上保持按钮说page1,在发生点击事件时,我正在调用iframe.

iframe包含两个文本框和一个下拉列表框.我希望用户在page1文本框中选择值.

Hello ,

can anybody solve my problem mentioned below...!!!

I have kept button on page say page1, on click event i am calling iframe.

iframe contains two textboxes and one dropdownlist box. I want values selected by user in page1 textboxes.

推荐答案

如果iframe内容与宿主页不在同一个域中,那么您可能会碰运气.浏览器的安全性不允许您访问表单值.

但是,如果它们在同一个域中,则可以通过处理按钮onclick事件使用javascript DOM模块导航IFrame子页面并提取所需的值(反之亦然).
If the iframe content is on a different domain from the host page you bang out of luck. The browser''s security won''t let you access the form values.

However, if they''re on the same domain then you can use the javascript DOM module to navigate the IFrame Child page and extract the values you want (or vice versa) by handling the buttons onclick event.


这篇关于将iframe的控制值返回到aspx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆