yangguoe
<script>
    // ajax的get请求,使用函数向其url添加参数
    function addURLParam(url,name,value){
        url+=(url.indexOf(\'?\')==-1?\'?\':\'&\');
        url+=encodeURIComponent(name)+\'=\'encodeURIComponent(value);
        return url;
    }
    //使用
    var url=\'example.php\';
    url=addURLParam(url,\'name\',\'nainai\')
</script>

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2021-06-26
  • 2021-11-23
  • 2022-02-07
猜你喜欢
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案