代码不在线工作,但在localhost中工作
Code is not working online but working in localhost
Hello下面的函数包含一个在localhost中正常工作的图像,但每当我将其上传到cpanel时,它就无法在线工作。
这是代码:
function CONshowElements()
{
var Construction = "<center><img src='images/SCALE Construction.PNG'></center><br>The construction company with several years of experience in projects valued over millions of USD having Service and Quality with satisfaction and appreciation of the clients.";
document.getElementById("contents").innerHTML = Construction;
}
您的服务器可能在Linux下运行,而本地主机可能在Windows下运行
这意味着图像文件名区分大小写。
检查您的图像名称是否真的是
SCALE Construction.PNG
而不是
SCALE Construction.png
如果是这样的话,那么在开发控制台上会得到一个404
此外,文件名中的空白是一个非常糟糕的主意
相关文章:
- Javascript:selenium Web驱动程序isDisplayed()不工作
- Javascript setInterval在localhost上工作,但确实'Don’我不在现场工作
- 如何在node.js的帮助下使用网站在localhost上工作
- jqGrid-在IE中产生SCRIPT5007错误,但在localhost上工作
- jQuery在发布到localhost后无法在 asp.net MVC中工作
- 无法远程连接到dlib Web服务器,localhost可以工作
- Angular Meteor应用程序在localhost中工作,但在部署到服务器时失败
- Angularjs在没有localhost的情况下无法工作
- 代码不在线工作,但在localhost中工作
- 写入JSON文件(使用Node.js在Localhost服务器上工作)
- Admin页面不能在orgfree中工作,拒绝用户'root'@'localhost'
- window.open(“ localhost “);不工作在win7(x64) ie8
- WebSocket到localhost不能在Microsoft Edge上工作
- 无法连接到CloudFoundry上的TCP服务器(localhost node.js工作正常)
- Fancybox YouTube视频无法在Localhost上工作
- Sails.js websockets在localhost中工作,但在我部署到Openshift后就不工作了
- 为什么这段代码在我的localhost中有效,而在;不要在网上工作
- 相同的代码工作在localhost /server2go,但不是当我把主机
- 简单的angularJS GET函数与localhost不工作
- 代码工作在JSFiddle,但不是Localhost,请帮助我找出原因