简体   繁体   English

Javascript / jQuery在我的网站上不起作用

[英]Javascript/jquery not working on my site

I'm creating a site, tested out on my local server and it worked fine, but once I moved it over ot my host anything to do with javascript/jquery on the page just refuses to work :/ 我正在创建一个站点,在我的本地服务器上对其进行了测试,并且工作正常,但是一旦将其移到我的主机上,则与该页面上的javascript / jquery无关的所有内容都将无法正常工作:/

http://www.neuromanga.com/mangaReader1.0.php?cid=1 http://www.neuromanga.com/mangaReader1.0.php?cid=1

could someone please help me out 有人可以帮我吗

You have <script> tags in your Javascript file. 您的Javascript文件中有<script>标记。 They need to be removed. 它们需要删除。 I think this will fix your problem. 我认为这可以解决您的问题。

Please remove the <Script> and </Script> tags from your Mangacaller.js file. 请从您的Mangacaller.js文件中删除<Script></Script>标记。

if you use <Script src='...'/> you don't use the script tags in that source file. 如果使用<Script src='...'/> ,则不会在该源文件中使用script标记。

The external script ( Mangacaller.js ) should not have the <script type="text/javascript"> and the corresponding </script> inside the external file. 外部脚本( Mangacaller.js )在外部文件中不应具有<script type="text/javascript">和相应的</script> The external file should be all JavaScript without any HTML (it's just the stuff that would go between the <script> tags if you embedded the script inside the HTML instead of referencing it as an external script). 外部文件应该是所有没有任何HTML的JavaScript(如果您将脚本嵌入HTML而不是将其引用为外部脚本,那么这只是<script>标记之间的内容)。 The browser parses this entire external file as JavaScript, not HTML, so there should be no HTML within the Mangacaller.js file. 浏览器将整个外部文件解析为JavaScript,而不是HTML,因此Mangacaller.js文件中不应存在HTML。

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

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