国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

VBS教程:函數-GetLocale 函數

2020-07-26 12:07:57
字體:
來源:轉載
供稿:網友

GetLocale 函數

返回當前區域設置 ID 值。

GetLocale()

說明

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

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

下面舉例說明 GetLocale 函數的用法。要使用該代碼,請復制標準HTML 文件中 <BODY&gtl 標志之間的所有內容。

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> 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 杭锦旗| 潜江市| 兴山县| 肥西县| 东山县| 左贡县| 土默特右旗| 古蔺县| 怀化市| 云梦县| 临江市| 科技| 巴林右旗| 连江县| 金阳县| 汉中市| 民勤县| 阜新| 霸州市| 丹棱县| 和顺县| 宁陕县| 沙湾县| 峨山| 通山县| 鹤壁市| 浦北县| 育儿| 商城县| 宕昌县| 巴楚县| 通许县| 托里县| 和田县| 临江市| 白玉县| 华亭县| 平度市| 横山县| 博乐市| 博罗县|