简体   繁体   中英

How to find define root directory in script tag

When publishing my web application for the first time. I've noticed that all source paths defined in the aspx pages ,that are not located in the root, have lost their link for example this one: In debug mode it worked fine. Just when published it doesn't work anymore. Even though the directory structure remains.

Any idea what the cause might be and how to solve it? I know I can use '..' if I want to go one directory up. But isn't there a way that I can say that it should look directly from the home directory down to the right file.

尝试

<script type="text/javascript" src="<%= Page.ResolveClientUrl("~/jquery.js") %>"></script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM