惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Schneier on Security
T
Tenable Blog
I
Intezer
S
Securelist
Scott Helme
Scott Helme
V
Visual Studio Blog
Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
T
The Blog of Author Tim Ferriss
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
F
Fortinet All Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
L
Lohrmann on Cybersecurity
M
MIT News - Artificial intelligence
G
GRAHAM CLULEY
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
雷峰网
雷峰网
MyScale Blog
MyScale Blog
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Announcements
Recent Announcements
C
CXSECURITY Database RSS Feed - CXSecurity.com
量子位
博客园 - 三生石上(FineUI控件)
P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
Cisco Talos Blog
Cisco Talos Blog
Security Latest
Security Latest
Project Zero
Project Zero
K
Kaspersky official blog
罗磊的独立博客
Know Your Adversary
Know Your Adversary
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - 白夜

fedora 17 安装mono ASP.NET MVC3实践笔记 最近要学习的几篇博文 input file 输入类型检测,及value清空 在网页中集成股票走势 Tomcat 报错 累死了 关于IIS无法启动,World Wide Web Publishing服务无法启动,提示错误127 给Aptana Studio添加aspx页面支持 javascript全局变量失效 模板页当中的js文件加载问题 javascript动态绑定img的src地址 关于IIS无法打开aspx页面的问题 关于WebService无法序列化接口的问题 简述WebService与.NET Remoting的区别及适应场合。(转) 关于单实例模式 关于Sys未定以的问题 希望 有关.NET中序列化的一些知识 [转]
Jscript运行时错误:没有权限
白夜 · 2009-02-07 · via 博客园 - 白夜

问题:我在页面A中放了一个iframe ,然后在iframe 的子页面中调用主页面中的javascript函数,结果报错Jscript运行时错误:没有权限

查原因:在网上查了一下,有的人说是逻辑错误,比如先关闭了iframe然后又要调用主页面当中的函数。我没有调用关闭主页面的方法,所以这种可能排除。还有的人说是子页面跨域了,仔细检查了一下iframe的src地址,对了,问题就出在了这:我的iframe的src地址是动态生成的。为了适应不同文件夹下的文件所以就把程序的发布地址记录在了xml文件当中,然后src的地址就是这个发布路径加上页面的名称,所以iframe的src最后的格式大概就是:http://+网站的虚拟路径+页面名称。这个src路径当然会被认为是跨域的,实际上应该用相对路径。由于浏览器的一些安全方面的措施,javascript跨域访问是被禁止的(有很多的欺诈性的网站就是利用javascript跨域访问获取客户端的cookie等敏感信息的),所以就报了以上错误。

解决:知道了原因,解决就容易了,我用 Request.ApplicationPath 获取了程序根目录的相对路径,然后src的格式就改成了这样:Request.ApplicationPath+文件夹名称+页面名称。测试一下,OK搞定,呵呵,原来都是自己的错啊。