Dialog中url传参中文乱码问题

js传参

<script type="text/javascript">
    function openDialog(url,title,width,height){
                var uncodeUrl = encodeURI(encodeURI(url));
                $.dialog({
                    title:title,
                    width: width,
                    height:height,
                    max:false,
                    min:false,
                    content: 'url:'+uncodeUrl
                });
            }
 }

jsp页面(${data.infoStr}z中含有中文)


"#" onclick="openDialogView('${context_path}/dcim/view/${data.infoStr}','查看信息',700,400)">查看 

后台接参

@RequestMapping(value="/view/{infoStr}",method = RequestMethod.GET)
    public ModelAndView view(@PathVariable("infoStr")String infoStr,Model model) throws UnsupportedEncodingException{
        String info = java.net.URLDecoder.decode(infoStr, "utf-8");

    }

你可能感兴趣的:(url,乱码,javascript)