Thursday, 13 June 2019

Create array list using jquery



<script src="~/plugins/jQuery/jquery-3.3.1.min.js"></script>


function GenerateList()
    {
        var pp = new Array();

        for (var t = 0; t < 2; i++) {
            debugger;
            var $trn = $(this);
            var json_arr = {};
            debugger;
            for (var i = 0; i < 10; i++) {
                json_arr["Col_" + i + ""] = "Value" + i;
            }
            var json_string = JSON.stringify(json_arr);
            pp.push(json_string);
        }
        $.ajax({
            url: '/Page/Methode',
            type: 'POST',
            data: { validID: pp },
            contenttype: "application/x-www-form-urlencoded", datatype: "html",
            success: function (data) {
                alert(1)
            }
        });

    }

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...