推薦:asp無組件上傳帶真實進度條asp無組件上傳帶真實進度條無組件上傳帶真實進度條 其中 upload.asp為核心代碼,除非特殊需要,一般不需要修改 demo.htm是演示無刷新進度條(IE5.5+支持) demo.asp為處理demo.asp上傳的文件,因為演示需要,在Demo.asp中僅僅上傳,不作保存,如果需要保存,只需去掉相關
<%
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
%>
<%
'以下為調用示例:
remoteurl="http://www.uyux.cn/logo.gif"'遠程文件名(絕對全路徑)
localfile=Replace(Replace(Replace(Now(),"-","")," ",""),":","")&Right(remoteurl,4)'本機文件名(可自定義)
If SaveRemoteFile(localfile,remoteurl)=True Then
Response.Write("成功保存:"&localfile)
End If
%>
-
分享:ASP實現靜態無刷新分頁效果#FormatTableID_0# html head title新聞列表簡化型/title script language=javascript !-- //ajax 控件也可以做成單獨文件方便到其它地方調用 function Ajax() { var xhrObj=null; if(window.XMLHttpRequest) { xhrObj=new XMLHttpRequest(); } else if(window.ActiveX
新聞熱點
疑難解答