在这里插入图片描述
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

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐