Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Spring MVC+;ThymileAF:无法通过GET方法发送值_Html_Spring Mvc_Thymeleaf - Fatal编程技术网

Html Spring MVC+;ThymileAF:无法通过GET方法发送值

Html Spring MVC+;ThymileAF:无法通过GET方法发送值,html,spring-mvc,thymeleaf,Html,Spring Mvc,Thymeleaf,我创建了一个表单,以便使用SpringMVC和Thymeleaf按日期进行搜索。表格如下: <form role="form" action="#" th:action="@{buscar(fecha=${fecha})}" method="get" id="frmBuscar"> <div class="form-group form-inline col-xs-5"> <label>Mes</label>

我创建了一个表单,以便使用SpringMVC和Thymeleaf按日期进行搜索。表格如下:

<form role="form" action="#" th:action="@{buscar(fecha=${fecha})}" method="get" id="frmBuscar">
    <div class="form-group form-inline col-xs-5">
        <label>Mes</label>
        <input type="text" class="form-control input-sm monthPiker" name="fecha" id="fecha"/>
        <input type="submit" class="btn btn-primary" id="buscarRetencion" value="Buscar Retenciones"/>
    </div>
</form> 

Mes

我注意到动作值是
“buscar?fecha=”
,而不是
“buscar?fecha=5-5-2015”
。我需要捕获字段
“fecha”

的值,以便从表单操作中删除fecha参数(使用
th:action=“@{buscar}”
而不是
th:action=“@{buscar(fecha=${fecha})”

有一个表单字段
fecha
,这种双重性可能会导致问题