gpt4 book ai didi

javascript - 从 javascript 代码提交到 spring Controller

转载 作者:行者123 更新时间:2023-12-03 06:03:25 25 4
gpt4 key购买 nike

我正在尝试从 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com