日期:2014-05-16 浏览次数:20604 次
<form id="fileForm"> <!--上传文件begin--> <input type="hidden" id="fileName" name="file.filename" /> <input type="hidden" id="name" name="file.name" /> <input type="hidden" id="size" name="file.size"/> <div id="divtcy2" style="display: none;"> <div class="zuzhuav4"> <div class="centtop">UpLoad</div> <div class="zuzhuangone"><span class="sp1">路径:</span> <span class="sp2"> <input id="upload" name="upload" type="file" onchange="fileUpload()" /> </span></div> <div class="h10"></div> <div class="zuzhuangone" style="text-align: center;"> <input id="buttonUpload" type="button" class="delcssbtncss" onclick="addFile()" value="确定" /> <input type="button" class="delcssbtncss" value="取消" onclick="javascript:msgBox_close();"/></div> <div class="h10"></div> </div> </div> <!--上传文件end--> </form> <!--新文件夹begin--> <form id="folderForm"> <div id="divtcy1" style="display: none;"> <div class="zuzhuavh"> <div class="centtop">AddFolder</div> <div class="zuzhuangone"><span class="sp1">文件夹名:</span> <span class="sp2"><input id="Text1" type="text" name="folder.name" class="cssinsear" value=""/></span> </div> <div class="zuzhuangone"> <span class="sp1">描述:</span> <span class="sp2"><textarea cols="" rows="" class="textaronerfv" name="folder.remark"></textarea></span> </div> <div class="h10"></div> <div class="zuzhuangone" style="text-align: center;"> <input name="" type="button" class="delcssbtncss" value="确定" onclick="addFolder();" /> <input name="" type="button" class="delcssbtncss" value="取消" onclick="javascript:msgBox_close();"/></div> <div class="h10"></div> </div> </div> </form> <!--新文件夹end-->
//添加文件夹 function addFolder() { var url = "${path}/resource/document!save.action"; $("#folderForm").ajaxSubmit( { dataType : "json", type : "post", url : url, success : function(result) { if (result.code == "0") { location.href = "${path}/resource/document!index.action"; } else { alert(result.msg); } } }); }