How should it be written so that it really works?
saveBuyerInfo( { 'save_'+$("#textAreaXMLPostRequest").attr('name') : $("#textAreaXMLPostRequest").val() } );
You cannot have an expression as a key in an object literal. Instead, first create your object:
var save = {}; save['save_' + $("#textAreaXMLPostRequest").attr('name')] = $("#textAreaXMLPostRequest").val(); saveBuyerInfo(save);
Source: https://habr.com/ru/post/1705059/More articles:Should I start a new open source project or join? - linuxGroup List of nodes in the Node Tree with XSL - xsltКакой лучший способ позволить пользователю выбрать подкаталог в С#? - c#Как получить строку столбца indentity после вставки с помощью LINQ - .netHow can I preload web application classes in the JVM at startup? - javaSerializing an arraylist in C # - c #Increase Lambda Perplexity - c ++Redirect the URL to go to the tomcat servlet using Apache / mod_proxy - tomcatInternet Explorer 8 and XMLHttpRequest prototypes - javascriptWhat is the best way to display additional information on a web page? Pop up when pressed or hover? - htmlAll Articles