在jquery没有正确引入时候会报错,解决途径:检查jquery是否正确引入 需要在<head></head>中添加 <g:javascript library="jquery"/>前提是grails默认jquery已经安装。