[Chinese] jqGrid parameters garbled

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. QQ discussion groups: 271934368 https://blog.csdn.net/huangjp_hz/article/details/78751647

notes

When using jqGrid, when a query parameter input Chinese, can not find the data, found to be passed to the distortion of the background, this time as long as jqGrid initialization parameters, adding mtype: "post" to the code as follows:

    $("#id).jqGrid({
        url: "",
        datatype: "json",
        postData: "",
        page : 1,
        mtype:"post",
        height: 305,
        multiselect: true,
        colNames:[],
        colModel:[],
        rownumbers: true,
        viewrecords : true,
        rowNum:10,
        rowList:[10,20,30],
        pager : "#pageId",
        altRows: true,
        autowidth: true,
        loadComplete : function() {
            var table = this;
            setTimeout(function () {
                updatePagerIcons(table);
                enableTooltips(table);
            }, 0);
        }
    });

Guess you like

Origin blog.csdn.net/huangjp_hz/article/details/78751647