欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

dwr [referencec0-e4,referencec0-e5]

程序员文章站 2022-05-13 12:46:40
...
前台传入的值的数据类型不对, 转换成字符串


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">


  <script type='text/javascript' src='/DwrDemo/dwr/interface/Pusher.js'></script>
  <script type='text/javascript' src='/DwrDemo/dwr/engine.js'></script>
  <script type='text/javascript' src='/DwrDemo/dwr/util.js'></script>
  <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
  <script type="text/javascript">
  function send(){

  var _value = $("#to_id").val();
  var data={to_id:String(_value)};
  Pusher.send(data,function(count){

})
  }
  </script>
  </head>
 
  <body onload="dwr.engine.setActiveReverseAjax(true);">
  <form method="post"  action="">
<select name="to_id" id="to_id" multiple=”multiple” >
<option value=1 >张三</option>
        <option value=2 >李四</option>
      <option value=3 >王五</option>
  </select>
          <input type="button" onclick="send();" value="发送">

  </form>
  </body>
</html>