Warm tip: This article is reproduced from serverfault.com, please click

javascript-分隔两个ID

(javascript - Separating two Ids)

发布于 2020-11-28 07:09:06

我需要将两个id传递给ci函数。我正在使用下面的脚本。我已设置了所有内容,但没有将ID作为一个数字一起传递。我需要一种可以在第一个和第二个ID之间添加正斜杠的方法

<script type="text/javascript">
    $(document).ready(function() {
       $('#example').DataTable({
            "ajax": {
                url : "<?php echo site_url("Single_test/All_presc1/". $id .$cid ) ?>",
                dataType: "json",
                type : 'GET',
                 dom: 'Bfrtip',
            buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
            },
        });
    
    });
    </script>
Questioner
Evans Tanui
Viewed
0
farvilain 2020-11-28 15:46:46

那呢

url : "<?php echo site_url('Single_test/All_presc1/'. $id . '/'. $cid ) ?>",