<!--静态资源加载 -->
<mvc:resources mapping="/images/**" location="/images/" />
<mvc:resources mapping="/css/**" location="/css/" />
<mvc:resources mapping="/fonts/**" location="/fonts/" />
<mvc:resources mapping="/js/**" location="/js/" />
xml文件中添加类似上面代码的,望采纳
js提交springmvc表单的方法如下:1、定义form元素:
<form name="myform" action="handleData.do">
查找: <input type='text' name='query' />
<a href="javascript: submitform()">
<img src="go.gif" width="33" height="19" border="0" />
</a>
</form>
2、编写js提交函数submitform,代码如下:
<script type="text/javascript">
function submitform()
{
if(document.myform.onsubmit &&
!document.myform.onsubmit()) //判断是否正在提交,如果是则直接返回
{
return
}
document.myform.submit()//调用form的submit()方法完成表单的提交
}
</script>