It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
7年前关闭。
当我在输入中插入常规英语字符,然后序列化表单(form.serialize)时,就可以了。但是当我输入格鲁吉亚字符(ასდფ)时,我遇到了编码问题,它显示如下:
%E1%83%A1%E1%83%90%E1%83%93%E1%83%A4%E1%83%90%E1%83%A1%E1%83%93%E1%83%A4.

提前谢谢你的帮助
编辑:
问题是!!! -->如何在不编码表单值的情况下序列化表单?

最佳答案

我知道这不是最好的解决办法,但我做到了:

function stringify(array) {
    var result = '';
    for (var i = 0; i < array.length; i++) {
        if (i != 0)
            result += '&';
        result += array[i].name + '=' + array[i].value;
    }
    return result;
}

stringify(form.serializeArray())

现在字符没有编码

10-05 21:01