js url传值乱码解决【总结备用】

js url传值乱码解决【总结备用】
1、function openWins()
{
   try
   {
        var apply_id='1001';
        currentTitle=encodeURI(encodeURI(currentTitle));
        var srcFile = "org!addOrg.do?flag="+apply_id+"&title="+currentTitle+"&id="+currentId; 
        
        var winFeatures = "dialogWidth=450px;dialogHeight=300px;status=no;help=no;"; 
        var seleItemValue='2010';
        var ret = window.showModalDialog(srcFile, seleItemValue, winFeatures);
        onclickeReturn(ret);
   }
   catch(e)
   {
      alert(e);
   }
}
2、String title=request.getParameter("title");
title=java.net.URLDecoder.decode(title,"utf-8");

你可能感兴趣的:(js url传值乱码解决【总结备用】)