Javascript Jquery中法语编码的问题
我花了3个小时寻找解决方案,但没有成功。 我通过AJAX POST发送变量Javascript Jquery中法语编码的问题,javascript,php,jquery,ajax,Javascript,Php,Jquery,Ajax,我花了3个小时寻找解决方案,但没有成功。 我通过AJAX POST发送变量familie“pompeainjection injectors”,我总是得到值“pompeÃinjection injectors”。我尝试过使用utf8\u编码,mb\u strtolower和更多,更多。。。。。但是没有运气 var familie = "<?php echo $familie ?>"; console.log(familie) marque = $('#car_marque').fi
familie
“pompeainjection injectors”,我总是得到值“pompeÃinjection injectors”。我尝试过使用utf8\u编码,mb\u strtolower和更多,更多。。。。。但是没有运气
var familie = "<?php echo $familie ?>";
console.log(familie)
marque = $('#car_marque').find(":selected").text();
$.ajax({
type: "POST",
data: {familie: familie, marque: marque },
dataType: "text",
url: "index.php?route=product/autres/cars",
success: function (data) {
var familie=”“;
控制台日志(家庭)
品牌=$(“#汽车品牌”).find(“:selected”).text();
$.ajax({
类型:“POST”,
数据:{家庭:家庭,品牌:品牌},
数据类型:“文本”,
url:“index.php?route=product/autres/cars”,
成功:功能(数据){
Console.log输出:“pompea注射注射器”。尝试以下操作:
$.ajax({
type: "POST",
data: {familie: familie, marque: marque },
contentType:"application/x-www-form-urlencoded; charset=UTF-8",
dataType: "text",
url: "index.php?route=product/autres/cars",
success: function (data) {
您是否尝试将html文件(或php)保存为utf-8或windows-1252(我不知道)而不是ansi?您的html页面中是否有相应的meta标记:
?谢谢。成功了!!!!