jquery datetimepicker 给出 404 not found (.png files) 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9341794/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jquery datetimepicker gives 404 not found (.png files) error
提问by aacanakin
I'am using thisdatetimepicker on my website. My html file includes .js and .css files ;
我在我的网站上使用这个日期时间选择器。我的 html 文件包括 .js 和 .css 文件;
<link rel="stylesheet" type="text/css" href="asts/css/style.css">
<script type="text/javascript" src="asts/js/modernizr.2.0.6.js"></script>
<script type="text/javascript" src="asts/js/jquery_1.7.1.js" ></script>
<script type="text/javascript" src="asts/js/jquery-ui-1.8.17.custom.min.js" ></script>
<script type="text/javascript" src="asts/js/jquery-ui-timepicker-addon.js" ></script>
<script type="text/javascript" src="asts/js/jquery.ui.slider.js" ></script>
<script type="text/javascript" src="asts/js/gonnasphere.js" ></script>
Also, I've imported the css files of custom minified package and datetime-picker-addon by @import url statement. I've also included the css/images folder with necessary icons.
另外,我已经通过@import url 语句导入了自定义缩小包和 datetime-picker-addon 的 css 文件。我还包含了带有必要图标的 css/images 文件夹。
When I click the text field, the jquery ui plugin works correctly. All the functions and ui works. However, firebug gives me the following network errors ;
当我单击文本字段时,jquery ui 插件工作正常。所有功能和用户界面都有效。但是,firebug 给了我以下网络错误;
- NetworkError: 404 Not Found - http://subdomain.domain.com/asts/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
- NetworkError: 404 Not Found - http://subdomain.domain.com/asts/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
- NetworkError: 404 Not Found - http://subdomain.domain.com/asts/css/images/ui-bg_glass_100_f6f6f6_1x400.png
- NetworkError: 404 Not Found - http://subdomain.domain.com/asts/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
- 网络错误:404 未找到 - http://subdomain.domain.com/asts/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
- 网络错误:404 未找到 - http://subdomain.domain.com/asts/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
- 网络错误:404 未找到 - http://subdomain.domain.com/asts/css/images/ui-bg_glass_100_f6f6f6_1x400.png
- 网络错误:404 未找到 - http://subdomain.domain.com/asts/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
Can you please help me to prevent getting this error ?
你能帮我防止这个错误吗?
回答by aacanakin
I've figured out the problem. It was a folder fault. When I changed the file paths of .png files in the jquery-ui-1.8.17.custom.css
file, it doesn't show any error.
我已经想通了问题所在。这是文件夹错误。当我更改文件中 .png 文件的文件路径时 jquery-ui-1.8.17.custom.css
,它没有显示任何错误。
Before I changed, it was ;
在我改变之前,它是;
url(images/ui-bg_inset-soft_50_c9c9c9_1x100.png)
After ;
后 ;
url(../images/ui-bg_inset-soft_50_c9c9c9_1x100.png)
回答by Alex K.
Those are jQueryUI assets, probably used by jquery.ui.slider.js.
这些是 jQueryUI 资产,可能由 jquery.ui.slider.js 使用。
Download the slider (+ its dependencies) from http://jqueryui.com/downloadand you will find the required CSS & images in \css\<selected-theme>
从http://jqueryui.com/download下载滑块(+ 其依赖项),您将在以下位置找到所需的 CSS 和图像\css\<selected-theme>
回答by Chleo
I had the same problem, I need to download the the JQueryUI assets and put the images folder in the stylesheets folder. I was using the .min files and had to switch for the non min one. It fixed my problem.
我遇到了同样的问题,我需要下载 JQueryUI 资产并将图像文件夹放在样式表文件夹中。我正在使用 .min 文件,不得不切换到非 min 文件。它解决了我的问题。