在这里插入图片描述
js,ajax

  <script>
        function on(id){
            // console.log(11);return
            // var options=$("#aa").val()
            console.log(id);

            var data = {
                id: id
                // goods_id:$('#a').val(),
            };
            $.ajax({
                url: "{:U('home/index/lista')}",
                data: data,
                type: 'post',
                success: function (reponse) {
                    // 'id='.$vo['productId']
                    // console.log(data);
                    // alert(data.id);
                    // location.href = "{:U('home/index/ajaxprogramme','id=')}";
                    // location.href = "{:U('home/index/ajaxprogramme','id=')}" +data.id;
                    location.href = "http://yfd.ydlweb.com/index.php/home/index/lista/id/"+data.id;
                    // location.href = "http://yfd.com/index.php/home/index/lista/id/"+data.id;
                    // location.href = options+"/index.php/home/index/ajaxlista/id/"+data.id;
                    return;
                }
            })
        }
    </script>
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐