Gives solution for any Error occurs in any Programming Language, .Net Core 3.1, 3.0, C#,Asp.Net,Sqlserver,MVC,Java,Php,Html,Css,Jquery,errors and solutions,Latest News,Technology

Monday, 16 May 2016

Get Values by name attribute from serializeArray() using jquery and javascript

No comments :
$('#form1').submit(function (e) {
                e.preventDefault();

                var values = {};

                $.each($("#form1").serializeArray(), function (i, field) {
                    values[field.name] = field.value;

                });

                var getValue = function (valueName) {
                    return values[valueName];
                };
var AnswerValue = getValue("radio_" + i);//Store values
}

No comments :

Post a Comment