我使用了这个表格并且我有3个数据,我用这样的形式发布了它们:
var form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", "/app/" + @appId + "/volumes/" + obj.data("rowid") + "/scheduledPublish");
var hiddenField = document.createElement("input");
hiddenField.setAttribute("type", "hidden");
hiddenField.setAttribute("name", "dateval");
hiddenField.setAttribute("value", dateval);
form.appendChild(hiddenField);
var hiddenField2 = document.createElement("input");
hiddenField2.setAttribute("type", "hidden");
hiddenField2.setAttribute("name", "hourval");
hiddenField2.setAttribute("value", hourval);
form.appendChild(hiddenField2);
var hiddenField3 = document.createElement("input");
hiddenField3.setAttribute("type", "hidden");
hiddenField3.setAttribute("name", "minuteval");
hiddenField3.setAttribute("value", minuteval);
form.appendChild(hiddenField3);
document.body.appendChild(form);
form.submit();
我怎样才能得到这些方法:
public static Result deleteVolume(Long dateval, Long appId) {
}
答案 0 :(得分:0)
我解决了。我从javascript到java得到了表单数据
form.data().get("name value")