简体   繁体   English

JavaScript无法在Chrome或Firefox上运行

[英]JavaScript not working on Chrome or on Firefox

Hi~I'm working on my personal website. 嗨〜我正在我的个人网站上工作。

I want to realize an "image slide show" effect with a java script that i downloaded. 我想用我下载的java脚本实现“图像幻灯片放映”效果。

It works well on IE, but it doesn't work on Chrome or Firefox. 它适用于IE,但它不适用于Chrome或Firefox。

PS: the original downloaded file works well on Chrome, but after i placing it to my site, the problem comes. PS:原始下载的文件在Chrome上运行良好,但在我将它放到我的网站后,问题就来了。

here is my site: http://iphrog.244213.dprktimes.com/ here is the java script sample code: http://iphrog.244213.dprktimes.com/index2.html 这是我的网站: http//iphrog.244213.dprktimes.com/这里是java脚本示例代码: http//iphrog.244213.dprktimes.com/index2.html

they use the same js file, but the js file doesn't work on chrome for my site. 他们使用相同的js文件,但js文件不适用于我的网站的chrome。

Whats the problem? 有什么问题?

The problem is your div with the id of content has a z-index of -1000. 问题是你的content id的divz-index为-1000。 This is causing it to not detect any of the clicks on your elements, as it is 'behind everything'. 这导致它无法检测到元素的任何点击,因为它“落后于一切”。 Remove this style, set it to 0 or set it to a non-negative number, and your script works fine. 删除此样式,将其设置为0或将其设置为非负数,并且您的脚本正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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