SWFUpload 傳說是比較給力的文件上傳空間 ,flash的 高大上
高大上的背後引入了一些抗,
坑1 : 動態傳參數到後臺
提交表單的時候需要動態設置
</pre><pre name="code" class="javascript">var postobj = {title:encodeURI($("#title").val(),"utf-8"),date:$("#date").datebox("getValue"),isuse:'1',content:encodeURI($("#content").val(),"utf-8"),type:$("#type").val(),price:$("#price").val()};
swfu.setPostParams(postobj);
swfu.startUpload();
坑2:傳中文字符爲null
前臺需要
encodeURI($("#title").val(),"utf-8")
後臺需要decode
java.net.URLDecoder.decode(titile,"UTF-8")