input type=checkbox的值后台怎么接受

input type=checkbox的值是on或off

实体类中这样写即可

    public void setChapterVisibility(Object chapterVisibility) {
        if (chapterVisibility.equals("on"))
            this.chapterVisibility = 1;
        else if (chapterVisibility.equals("off"))
            this.chapterVisibility = 0;
        else
            this.chapterVisibility = (int) chapterVisibility;
    }

 

posted @ 2018-05-13 19:41  轻红  阅读(773)  评论(0编辑  收藏  举报