我的 javascript 的位置有问题,位置是正确的,但是当我在我的 visual web developer 2010 express 中运行它时,找不到位置,我不知道为什么.. .
这是我的 javascript 的位置:
<script src="Style/javascript/jquery-1.7.1.js" type="text/javascript"></script>
这里是错误:
**Server Error in '/Maitenance' Application.**
**The resource cannot be found.**
**Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.**
**Requested URL: /Maitenance/Maintenance/Style/javascript/jquery-1.7.1.js**
最佳答案
使用这个...它会起作用
<script src="<%=Page.ResolveUrl("~")%>Style/javascript/jquery-1.7.1.js" type="text/javascript"</script>
关于在我的 ASP.Net 应用程序中找不到 Javascript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14431487/