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

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
G
Google Developers Blog
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
博客园 - 叶小钗
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
D
DataBreaches.Net
P
Palo Alto Networks Blog
C
Cisco Blogs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
Schneier on Security
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
N
News and Events Feed by Topic
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Engineering at Meta
Engineering at Meta
Last Week in AI
Last Week in AI
AWS News Blog
AWS News Blog
Security Latest
Security Latest
H
Heimdal Security Blog
小众软件
小众软件
Cyberwarzone
Cyberwarzone
The Hacker News
The Hacker News
P
Privacy International News Feed
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
Scott Helme
Scott Helme
博客园 - 【当耐特】
Latest news
Latest news
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
Jina AI
Jina AI
Spread Privacy
Spread Privacy
量子位
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
雷峰网
雷峰网

博客园 - 白夜

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",哈哈,好了搞定