推薦:asp無(wú)組件上傳帶真實(shí)進(jìn)度條asp無(wú)組件上傳帶真實(shí)進(jìn)度條無(wú)組件上傳帶真實(shí)進(jìn)度條 其中 upload.asp為核心代碼,除非特殊需要,一般不需要修改 demo.htm是演示無(wú)刷新進(jìn)度條(IE5.5+支持) demo.asp為處理demo.asp上傳的文件,因?yàn)檠菔拘枰?,在Demo.asp中僅僅上傳,不作保存,如果需要保存,只需去掉相關(guān)
<%
Function SaveRemoteFile(LocalFileName,RemoteFileUrl)
SaveRemoteFile=True
dim Ads,Retrieval,GetRemoteData
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
If .Readystate<>4 then
SaveRemoteFile=False
Exit Function
End If
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile server.MapPath(LocalFileName),2
.Cancel()
.Close()
End With
Set Ads=nothing
End Function
%>
<%
'以下為調(diào)用示例:
remoteurl="http://www.uyux.cn/logo.gif"'遠(yuǎn)程文件名(絕對(duì)全路徑)
localfile=Replace(Replace(Replace(Now(),"-","")," ",""),":","")&Right(remoteurl,4)'本機(jī)文件名(可自定義)
If SaveRemoteFile(localfile,remoteurl)=True Then
Response.Write("成功保存:"&localfile)
End If
%>
-
分享:ASP實(shí)現(xiàn)靜態(tài)無(wú)刷新分頁(yè)效果#FormatTableID_0# html head title新聞列表簡(jiǎn)化型/title script language=javascript !-- //ajax 控件也可以做成單獨(dú)文件方便到其它地方調(diào)用 function Ajax() { var xhrObj=null; if(window.XMLHttpRequest) { xhrObj=new XMLHttpRequest(); } else if(window.ActiveX
新聞熱點(diǎn)
疑難解答
圖片精選