|
添加附件时出现:input_form" action="savefile.asp?t=1&boardid='+DvFileInput.boardid+'" target="_self" method="post" enctype="multipart/form-data" style="margin:0;padding:0;"><input id="UploadCode" type="hidden" value="'+DvFileInput.uploadcode+'" name="UploadCode"/>
<div id="dv_fileinput_formarea"><img alt="点击文字添加附件" src="http://www.cncclub.cn/images/others/fileitem.gif" border="0"/> <a href="javascript:;">添加附件<input class="addfile" id="dv_fileinput_0" type="file" onchange="DvFileInput.add();" size="1" name="dv_fileinput_0"/></a> <span id="dv_fileinput_upbtn"><a href="javascript:DvFileInput.send();">上传附件</a></span> <span id="dv_fileinput_msg"></span>'+DvFileInput.readme+'</div></form>
<div></div>
<div id="dv_fileinput_show"></div>'); }, send:function(){ if (DvFileInput.realcount>0){ DvFileInput.$('dv_fileinput_'+DvFileInput.count).disabled=true; DvFileInput.$('dv_fileinput_upbtn').innerHTML='上传中,请稍等..'; DvFileInput.$('dv_fileinput_form').submit(); }else{ alert('请先添加附件再上传。'); } }, clear:function(){ for (var i=DvFileInput.count; i>0; --i){ DvFileInput.remove(i); } DvFileInput.$('dv_fileinput_form').reset(); var o=DvFileInput.$('dv_fileinput_btn_0'); if(o){o.parentNode.parentNode.removeChild(o.parentNode);} DvFileInput.$('dv_fileinput_0').disabled=false; DvFileInput.$('dv_fileinput_0').style.display=''; DvFileInput.count=0; DvFileInput.realcount=0; } } DvFileInput_OnResize=function(){ var o=parent.document.getElementById("ad"); (o.style||o).height=(parseInt(DvFileInput.realcount)*16+18)+'px'; } DvFileInput_OnUpload=function(iFtype,sExt,sOldName,sShowName,iDownid){ try{ if ('1'==iFtype||'2'==iFtype){ parent.dvtextarea.insert('[upload='+sExt+','+sOldName+']'+sShowName+'[/upload]<br/>'); }else{ parent.dvtextarea.insert('[upload='+sExt+','+sOldName+']viewFile.asp?ID='+iDownid+'[/upload]<br/>'); } parent.Dvform.upfilerename.value+=(iDownid+','); }catch(e){} } DvFileInput_OnEcho=function(str){ DvFileInput.$('dv_fileinput_msg').innerHTML=str; } DvFileInput_OnMsgSuc=function(str){ DvFileInput_OnEcho(str); DvFileInput.clear(); } DvFileInput_OnMsgFail=function(str){ DvFileInput_OnEcho(str); DvFileInput.clear(); } DvFileInput_OnUpdateRndCode=function(str){ DvFileInput.$('UploadCode').value=str; } //--> </script>
<script language="javascript">
<!--
DvFileInput.boardid='59';
DvFileInput.uploadcode='1813';
DvFileInput.uped=parseInt('0');
DvFileInput.max=parseInt('10');
DvFileInput.once=parseInt('2');
DvFileInput.readme='今天还可上传'+DvFileInput.max+'个<a style="CURSOR: help" title="论坛限制:一次'+DvFileInput.once+'个,一天10个,每个200K">(查看论坛限制)</a>';
DvFileInput.init();
DvFileInput_OnResize();
//-->
</script>
<script language="javascript">DvFileInput_OnEcho('<font color="red">请正确选择要上传的文件。</font>')</script> |
|