当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Adding json result to a form action url

问题描述:

I want to add the result coming back from the json to the end of my form action.

This is the code I have now

$('.listAllBugs').append('<tr class="table-stroke"><td>'+bugDetails+'</td><td><a href="#edit">Edit</a></tr>');

The form is in the #edit area. Which has the form as

<form id="users-form" action="" method="post">

The action url is the one I want to change.. Ideas would be helpful!

网友答案:

this will set the form action to a new value:

$('form#users-form').attr('action', '');
分享给朋友:
您可能感兴趣的文章:
随机阅读: