为了避免歧义,可以用JS 的encodeURIComponent函数  将有歧义的字符(?+=等)转换成对应的ASCII编码

JS encodeURIComponent函数

for(var i=0;i<whichform.elements.length;i++){
  element =  whichform.elements[i];
  dataparts[i] = element.name + '=' + encodeURIComponent(element.value)
}

 

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2021-11-20
  • 2022-12-23
猜你喜欢
  • 2021-11-11
  • 2021-07-31
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
相关资源
相似解决方案