cancaten two datetime variables in a URL with ajax?

0

I want to concatenate two datetime variables in a URL with ajax and I do not know how to structure the url, if someone can help me please leave a portion of the code I'm using ...

<script>
    function cargarData() {
            var datos = {};
            datos.desde = desde.option('value');
            datos.hasta = hasta.option('value');

            $.ajax({                
                url: rutaApi + "visita/" + desde,
                method: "GET",
                data: JSON.stringify(datos),
                contentType: "application/json",
                success: function (data) {
                    debugger;
                    if (!data.error) {                       
                        $("#grdConsultas").dxDataGrid({
                            dataSource: data,
                            "export": {
                                enabled: true,
                                fileName: "Visitas",
                                allowExportSelectedData: true,
                            }
                        });
                    }
                }
            });
        }
</script>

Attached to this I must concatenate the other variable that would be up to

url: rutaApi + "visita/" + desde,

I'm a novice in the web programming environment, I hope you can help me

    
asked by Reyes 22.04.2018 в 05:00
source

0 answers