[英]Why won't my link take the user anywhere, but if I right click and select “Open in new tab” it will open fine
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.