JS新人求解。是在做网上找的课程的练习题。本来按照练习做了第一个jQuery实现了效果,如下:var formattedName = HTMLheaderName.replace("%data%","Beijing"); $("#header").append(formattedName);相关其他js文件:var HTMLheaderName = '<h1 id="name">%data%</h1>';然后第二个练习声明了一个对象,在第一个jQuery练习的语句前面: var bio = { "name" = "Beijing", "role" = "Web Developer", "welcomeMessage" = "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", "biopic" = "images/fry.jpg", "contacts" = { "mobile" = 999999999, "email" = "xxxxxxx@gmail.com", "github" = "xxxxxx", "location" = "China" }, "skills" = [ "css","html","javascript" ] };然后前面的jQuery就失效了。这是为什么?新人求解,谢谢大家。
添加回答
举报
0/150
提交
取消