草庐IT

iframe_window

全部标签

javascript - Firefox 插件 SDK : Loading addon file into iframe

我想加载一个resource://链接,分别是我的Firefox插件中的一个本地文件到网页的iframe中。原因是,出于安全原因,资源应该以可视方式嵌入到网页中,同时不允许网站访问其DOM。这个问题过去曾在不同的地方讨论过,例如这里(没有解决方案):https://bugzilla.mozilla.org/show_bug.cgi?id=792479由于大多数帖子都比较老,我想问一下,在此期间是否有任何新的解决方案或解决方法。 最佳答案 我想我在错误中或在jetpack的ML中提出了一个糟糕的解决方法,基本上是将resource:/

javascript - 电话链接在 iframe 中不起作用,尽管它在 iOS9 web 中的 div 中起作用。如何使电话链接在 iOS9 safari 中正常工作?

您好,我在iOS9的iframe中尝试电话链接。在iOS9中,电话应用程序无法在safari中打开。当我在里面尝试相同的链接时,它在那里工作。我正在尝试在anchor标记下方。这段代码放在div中时会打开电话应用程序。但是相同的代码在iframe中不起作用。请建议如何在iframe中工作?请使用以下代码查看iframe外的电话链接1-408-555-5555请使用以下代码验证iframe中的电话链接。variframe=document.getElementById("test");variDoc=iframe.contentDocument;iDoc.write('1-408-555

javascript - Iframes 和 React.js - 如何将 youtube 视频嵌入我的应用程序

我正在尝试了解如何将YouTube嵌入到我的应用中。importReactfrom"react"importPageheaderfrom'react-bootstrap/lib/Pageheader';importResponsiveEmbedfrom'react-bootstrap/lib/ResponsiveEmbed';importGridfrom'react-bootstrap/lib/Grid';exportdefaultclassServicesextendsReact.Component{render(){return(AboutusM2ConsultingisBring

paddleocr,windows pip 安装巨坑 lanms 库,全网最简单,最直接,最有效(记录贴)

paddleocr最后几个库一个比一个难装,特别是lanms库,巨难装,拒绝任何花里胡哨,十分钟,三步内解决问题。pip下载报错Keyringisskippedduetoanexception:'keyring.backends'CollectinglanmsUsingcachedlanms-1.0.2.tar.gz(973kB)ERROR:Commanderroredoutwithexitstatus1:command:'C:\Users\TensorFlow\anaconda3\python.exe'-c'importsys,setuptools,tokenize;sys.argv[0]=

javascript - 如何在JavaScript中改变window.location.href然后执行更多的JS?

我有代码片段,它是在点击如下链接时执行的cj_redirecturl="/HomeWork/main/load_course";utility.xhttprw.data(cj_redirecturl,{data:courseid},function(response){if(response){window.location.href=base_url+"main";///nextutility.xhttprw.data(redirecturl,{data:""},function(response){if(response){id=ent;document.getElementByI

javascript 使用严格的文档类型创建一个 iframe

我正在构建一个可以嵌入其他站点的小部件。该小部件是使用document.write()创建的iframe,但是我不知道如何使用javascript应用iframe文档类型。这是我的代码:document.write("");document.write("");document.write("");document.write("");document.write("");document.write("");document.write("");iframe已创建,但未应用文档类型。有办法做到这一点吗?谢谢 最佳答案 为了写入if

javascript - Angular : src attribute bug in Iframe directive

我在尝试实现Iframe指令时遇到问题。就我而言:模板:指令:angular.module('project.directives',[]).directive('externalIframe',['$rootScope',function($rootScope){return{restrict:'C',replace:true,transclude:true,scope:{src:'@iframeSrc',//thesrcusesthedata-bindingfromtheparentscope},template:'',link:function(scope,elem,attrs)

javascript - 具有命名函数的 window.removeEventListener 不起作用

我正在使用React,下面是我用来实现无限滚动功能的代码。componentDidMount(){//Flagtocheckifthecontenthasloaded.letflag=true;functioninfiniteScroll(){letenterpriseWrap=$('.enterprise-blocks');letcontentHeight=enterpriseWrap.offsetHeight;letyOffset=window.pageYOffset;lety=yOffset+window.innerHeight;console.log('hey');if(thi

javascript - window.toString.call 在 IE8 中未定义

当你运行时:window.toString.call("")在FF/CH中一切正常,但在IE8中出现脚本错误。进一步调查发现,window.toString.call在IE8中未定义?你也可以运行这个:window.toStringinstanceofFunction;//falsealert(window.toString);//functiontoString(){//[nativecode]//}这是为什么以及如何解决它?我开始想知道jQuery最初是如何工作的? 最佳答案 window是一个宿主对象,ECMAScriptLa

javascript - 检查页面是否在 Google Chrome 的 Iframe 中

我试过window的很多属性,看看iframe中的页面是否可以判断它是否在iframe中。我试过:if(top.location!=self.location)//doesn'tworkinGoogleChromealert("Iaminaniframe!")这不起作用(适用于除Chrome之外的所有浏览器)。我正在为Firefox和Chrome编写用户脚本,但Chrome确实不正常。有没有办法判断Chrome是否可以检测其页面是否在iframe中? 最佳答案 这适用于框架,我认为它也适用于iFrameif(top===self){