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

推荐订阅源

Engineering at Meta
Engineering at Meta
M
MIT News - Artificial intelligence
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
NISL@THU
NISL@THU
P
Proofpoint News Feed
Microsoft Security Blog
Microsoft Security Blog
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
G
GRAHAM CLULEY
The Register - Security
The Register - Security
S
SegmentFault 最新的问题
I
Intezer
Know Your Adversary
Know Your Adversary
T
Threatpost
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
Security Latest
Security Latest
量子位
S
Securelist
Recorded Future
Recorded Future
V2EX - 技术
V2EX - 技术
Application and Cybersecurity Blog
Application and Cybersecurity Blog
阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
P
Privacy International News Feed
AI
AI
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
博客园_首页
IT之家
IT之家
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
Help Net Security
Help Net Security
C
CERT Recently Published Vulnerability Notes
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The GitHub Blog
The GitHub Blog
美团技术团队
L
LangChain Blog
F
Fortinet All Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Security Affairs
Cloudbric
Cloudbric
O
OpenAI News
PCI Perspectives
PCI Perspectives
J
Java Code Geeks
P
Privacy & Cybersecurity Law Blog
B
Blog RSS Feed
MyScale Blog
MyScale Blog

博客园 - 白夜

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

问题:我在master页面中引入了如下js文件:<script type="text/javascript" src="http://www.cnblogs.com/js/jquery-1.2.6.js"></script>,但是我在页面当中怎么也调用不到该js文件当中的函数。

找原因:一找:难道是我的路径写错了位置?从新检查了路径对的啊,郁闷

    二找:难道是我的函数名写错了?查了一下,没问题。

    三找:想了半天,可能还是路径的问题,仔细想一下,终于想明白了,当网站运行时我看了页面的源文件,发现此时的js文件路径是相对于master模板的相对路径,真相大白了,由于我当前页面和master页面不是在同一文件夹下,所以当浏览该页时js文件肯定找不到了啊!怎么好像我以前也遇到过类似的问题,呵呵,哎,人老了容易忘事啊。

解决:解决很简单啦,把路径改了就好啦啊,呵呵于是我把路径改成了这样: src="<%=Request.ApplicationPath %>/js/jquery-1.2.6.js",哈哈,好了搞定