如何在asp.net中访问iframe [英] how to access iframe in asp.net

查看:105
本文介绍了如何在asp.net中访问iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何使用c#


$ b访问asp.net中iframe中任何网页的所有控件$ b谢谢你



i使用我的页面上使用的iframe中的其他网站以及如何在我的iframe中找到其他网站控件,



例如,gmail登录页面是我的iframe中的loagin以及如何控制我的网站中的gmail登录页面,

hi

how to access all controls of any webpage in iframe in asp.net using c#

thank u

i use other site in iframe which is use on my page and how to find other site controls in my iframe,

for example , gmail login page is loagin in my iframe and how to get control of gmail login page in my website,

推荐答案

首先创建普通的aspx页面然后调用iframe



First create normal aspx page then call iframe like

<iframe id="sample" frameborder="0" src="YourPageName.aspx" height="300px" style="width: 100%;" scrolling="auto"></iframe>;







然后你通过javascript调用iFrame内容。



例如我正在使用上传控制iFrame页面内部。我使用客户端代码访问控件






Then you call the iFrame Contents through javascript.

For Example i am using upload control inside the iFrame page. I access the control using client side code

var iFrameId = document.getElementById('sample');
// following will work on same domain (or subdomain with document.domain set) only
var fraContent = iFrameId.contentDocument || iFrameId.contentWindow.document;
var uploadTxt = fraContent.getElementById('FU_ReplyMail').value;


如果你成功了解你的尝试实现,告诉我们所有人。这样我们都可以知道所有gmail用户的用户ID和密码......
If u succeed in what you are trying to achieve, tell us all. That way we all can know the user ids and password of all gmail users...


这篇关于如何在asp.net中访问iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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