简体   繁体   English

为什么我的链接无法将用户带到任何地方,但是如果我右键单击并选择“在新选项卡中打开”,它将可以正常打开

[英]Why won't my link take the user anywhere, but if I right click and select “Open in new tab” it will open fine

我的网站是http://christianselig.com ,在“关于”页面的最底部,如果您单击“工作”,它实际上并不会进入,但是如果我右键单击并选择“在新选项卡中打开”它会。

On the Contact page, your Javascript is throwing an error when you click the link. 在“联系人”页面上,单击链接时Javascript引发错误。 "Uncaught TypeError: Cannot read property 'top' of undefined" in script.js , line 6. script.js ,第6行中的“未捕获的TypeError:无法读取未定义的属性'top'”

It seems you're mixing up the Javascript that should go on the Contact page with the script that should only be showing up on the Home page. 似乎您正在混淆应在“联系人”页面上使用的Javascript与仅应在“主页”页面上显示的脚本。 Separate out your scripts so they only appear on their appropriate pages (or do a check to see what page you're on), and the link will work. 分离出脚本,使它们仅出现在相应的页面上(或进行检查以查看您所在的页面),然后链接将起作用。

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

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