最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

startDownload Method

Internet Development Index

Downloads the specified file.

Syntax

download.startDownload(sUrl, fpCallback)

Parameters

sUrl Required. String爐hat specifies the location of the file to download.
fpCallback Required. Function pointer that specifies the code to execute after the download is complete.

Return Value

No return value.

Remarks

The callback function pointer takes a single parameter. When a file downloads successfully, the file contents are passed as the parameter and are accessible in script.

The startDownload method returns only the content of text documents. If a different document format is downloaded, the format is returned, but the file content is not.

Note  In order to use the startDownload method with Microsoft® Visual Basic® Scripting Edition (VBScript), you need to use the GetRef to obtain a function pointer. The function pointer can then be passed to startDownload.

The following sample code shows a callback function.

// The callback function accepts one parameter.
function fnCallBack(vData){
/* vData stores the downloaded file content.
The content can be split into an array,
written to another file, or processed in a form.
*/
var aData=vData.split("\n");
}

Examples

This example uses the startDownload method to begin downloading a file when the user clicks the link. In addition, the specified callback function, onDownloadDone, is notified when the download is complete.

<HTML XMLNS:MSIE >
<MSIE:DOWNLOAD ID="oDownload" STYLE="behavior:url(#default#download)" />
<SCRIPT>
function onDownloadDone(s) { alert (s); }
</SCRIPT>
<P>Click <A HREF="javascript:oDownload.startDownload('download.htm',
onDownloadDone)">here</A> to download this page.
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

This example demonstrates using the download behavior with VBScript.

<HTML XMLNS:IE>
<SCRIPT LANGUAGE="VBScript">
Function onDownloadDone(s)
MsgBox s
End Function
</SCRIPT>
<IE:DOWNLOAD ID="oDownload" STYLE="behavior:url(#default#download)" />
<button
onclick="vbscript:oDownload.startDownload 'downloadvb.htm', GetRef('onDownloadDone')">
Download File</button>

Standards Information

There is no public standard that applies to this method.

Applies To

download
海宁市| 承德市| 光泽县| 秦皇岛市| 北流市| 鄂州市| 永定县| 宜宾市| 雷山县| 古田县| 武穴市| 荔波县| 称多县| 久治县| 闻喜县| 象山县| 明光市| 盈江县| 伊宁县| 太湖县| 巨鹿县| 福海县| 武定县| 越西县| 会同县| 乐陵市| 滦平县| 长汀县| 志丹县| 宜昌市| 徐州市| 江门市| 晋江市| 库伦旗| 兴仁县| 石河子市| 福州市| 华阴市| 嘉定区| 麻城市| 西充县|