如何获取my97datepicker的值,在线等
展开全部
你的后台是servlet?如果这样,举个例子:
页面:
XML/HTML code?
<form action="com/testServlet" method="post">
<input type="text" name="mdate" /><!--日期文本框-->
<input type="submit" value="提交"/>
</form>
servlet(在doPost方法中获取,和form的method属性一致):
Java code?
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
String date = request.getParameter("mdate");//获取日期文本框内容
}
页面:
XML/HTML code?
<form action="com/testServlet" method="post">
<input type="text" name="mdate" /><!--日期文本框-->
<input type="submit" value="提交"/>
</form>
servlet(在doPost方法中获取,和form的method属性一致):
Java code?
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
String date = request.getParameter("mdate");//获取日期文本框内容
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询