添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am going to serializeObject and pass the object parameters received from the form.

I pushed to add id parameter but js error. ( data.push is not function )

I'm asking to querystring or push to an array element.

var data = $('form#buildForm').serializeObject() + "&param=testplanId";  // not working
var data = $('form#buildForm').serialize() + "&param=testplanId"; // not working

===========this is my sample code==========

$("#addBuild").on("click", function(){
   var testplanId = [[${testplan_id}]];   // Parameter to send.
   if(confirm("")){
        var data = $('form#buildForm').serializeObject();
        data.push({name:'testplanId', value:'testplanId'});     
       // ajax 처리
	$.ajax({
              type : "post",
	      url : "createBuild.json",
              data : JSON.stringify(data),
             dataType : "JSON",
	     contentType : "application/json",
	      success : function(data){
                serializeObject ? from which library?   check similiar stackoverflow.com/questions/58143630/…
– Mate
                Oct 8, 2019 at 4:31
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.