我正在尝试从 JavaScript 向 Controller 提交表单,但表单按钮未显示。
这是我的尝试
for (var i = 0; i < json.length; i++) {
users += '<strong>' + json[i].email + '</strong><br/>' + '<br/>' + json[i].tok + '<hr><br/>';
//trying to hit to the controller from here but it is not working
//trying to hit to the controller from here but it is not working
'<form method="post" action="searchAdmin" novalidate="novalidate">'
'<input type="email" value="json[i].email" name="searchName" id="searchName"/>'
//on clicking the fetch button let it submit to the controller
'<input type="submit" value="FETCH" />'
'</form>'
请帮忙!
最佳答案
user+='<form met....
因为您在第一行使用了 ;
,所以您需要附加此字符串
关于javascript - 从 javascript 代码提交到 spring Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39656271/