开发者

Unexpected token at the end of my script

I keep getting an unexpected token script error in developer tools. (fixed) Now I am getting an error involving my smarty function being used in my case..Uncaught SyntaxError: Unexpected identifier.

<script type="text/javascript">
    $(document).ready(function () {
        开发者_如何学编程$("select[name=highSchool]").change(function () {
            switch ($("select[name=highSchool]").val()) {
                case 'Not yet attending':
                    $(this).parent().parent().sibling("tr#currentGrade").children("td#currentGrade").html(
                    "{html_options name='currentGrade' options=$currentGrade}");
                break;
                case 'Attending':
                    $(this).parent().parent().sibling("tr#currentGrade").children("td#currentGrade").html("");
                break;
                default:
                $(this).parent().parent().siblings("tr#currentGrade").children("td#currentGrade").html("");
            }
        });
    });
</script>


The second-to-last line should be: }); otherwise your .change() is left unclosed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜