佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > VBS教程:函數(shù)-GetLocale 函數(shù)

VBS教程:函數(shù)-GetLocale 函數(shù)

熱門標(biāo)簽:美圖手機(jī) 銀行業(yè)務(wù) 鐵路電話系統(tǒng) 服務(wù)器配置 網(wǎng)站文章發(fā)布 智能手機(jī) 檢查注冊表項(xiàng) 呼叫中心市場需求

GetLocale 函數(shù)

返回當(dāng)前區(qū)域設(shè)置 ID 值。

GetLocale()

說明

locale 是用戶參考信息集合,與用戶的語言、國家和文化傳統(tǒng)有關(guān)。locale 決定鍵盤布局、字母排序順序和日期、時間、數(shù)字與貨幣格式。

返回值可以是任意一個 32-位 的值,如 區(qū)域設(shè)置 ID所示:

下面舉例說明 GetLocale 函數(shù)的用法。要使用該代碼,請復(fù)制標(biāo)準(zhǔn)HTML 文件中 BODYgtl 標(biāo)志之間的所有內(nèi)容。

Enter Date in UK format: input type="text" id="UKDate" size="20">p>Here's the US equivalent: input type="text" id="USdate" size="20">p>input type="button" value="Convert" id="button1">p>Enter a price in German: nbsp; input type="text" id="GermanNumber" size="20">p>Here's the UK equivalent: input type="text" id="USNumber" size="20">p>input type="button" value="Convert" id="button2">p>script language="vbscript">Dim currentLocale' Get the current localecurrentLocale = GetLocaleSub Button1_onclick  Dim original  original = SetLocale("en-gb")  mydate = CDate(UKDate.value)  ' IE always sets the locale to US English so use the  ' currentLocale variable to set the locale to US English  original = SetLocale(currentLocale)  USDate.value = FormatDateTime(mydate,vbShortDate)End SubSub button2_onclick  Dim original  original = SetLocale("de")  myvalue = CCur(GermanNumber.value)  original = SetLocale("en-gb")  USNumber.value = FormatCurrency(myvalue)End Sub/script> 

標(biāo)簽:樂山 紅河 上海 長治 河南 滄州 新疆 沈陽

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《VBS教程:函數(shù)-GetLocale 函數(shù)》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    台州市| 华亭县| 厦门市| 吉林省| 兰溪市| 莱州市| 古田县| 凤山市| 密山市| 蓝田县| 井陉县| 江北区| 平和县| 芮城县| 灵石县| 福州市| 邳州市| 苏尼特右旗| 四川省| 岫岩| 新乡县| 康保县| 紫云| 衢州市| 渭南市| 黔西| 湘潭市| 都昌县| 阳原县| 南丹县| 安龙县| 静海县| 西乌| 华安县| 潼南县| 南华县| 延安市| 青铜峡市| 图木舒克市| 黄梅县| 玉山县|