0

我的玉模板上有这样的表格

  form(action='/scheduler/save/' + project.Id, method='post')
                div.form-group
                    label.control-label.col-md-2 RecurringPattern
                    div.col-md-10
                        div#RecurringPatternControl
                div.form-group
                    label.control-label.col-md-2 StartDate
                    div.col-md-3
                        //input#StartDate.form-control
                        input(id='StartDate', class='form-control', value='#{project.StartDate} ', enctype="application/x-www-form-urlencoded")
                div.form-group
                    div.col-md-offset-2.col-md-10
                        input(type="submit", value="Save").btn.btn-lg.btn-success

我想StartDate从节点js中的输入值,我得到div#RecurringPatternControlreq.bodyStartDate不能得到((我该如何解决这个问题?

4

1 回答 1

2

我认为您需要在输入中添加一个“名称”属性,以便以后能够检索它。只需尝试添加类似

input(id='StartDate', name='startDate', class='form-control', value='#{project.StartDate} ', enctype="application/x-www-form-urlencoded"

如果不尝试查看整个 POST 标头以查看实际发生的情况,它应该可以工作(如有必要,可能会在此处发布)

希望这可以帮助 !

于 2015-07-07T07:38:41.693 回答