my_input = "this&is£some text"
encoded_input = urllib.quote_plus(str(my_input))
…到JavaScript:
var my_input = "this&is£some text";
encoded_input = encodeURIComponent(my_input);
细微差别在于urllib.quote_plus()会将空格转换为(link)而不是(link).
只是想知道是否有人可以提供任何想法.
目前正在与…
var my_input = "this&is£some text";
encoded_input = encodeURIComponent(my_input).replace(/%20/g,'+');
最佳答案