js错误:xx is not defined at HTMLAnchorElement.onclick原因及解决方法董德多2017年12月26日0 在做前端超链接onclick编程时,浏览器报错xx is not defined at HTMLAnchorElement.onclick,经过检查发现我把onclick函数写到了jquery的$().ready()中了,这样HTML页面搜索不到该函数,解决方法有两种。