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

首頁 > 編程 > VBScript > 正文

VBS教程:函數-SetLocale 函數

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

SetLocale 函數

Sets the global locale and returns the previous locale.

SetLocale(lcid)

lcid 參數可以是任意一個合法的 32 位數值或短字符串,該值必須唯一標識一個地理區域。能被識別的值可以查閱 區域設置 ID 表。

說明

lcid 為零,區域被設置為與當前系統設置匹配。

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

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

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> 

請參閱

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 巫山县| 新晃| 古田县| 称多县| 临洮县| 长沙市| 郯城县| 巫山县| 彭州市| 长沙县| 宿州市| 弥渡县| 延津县| 合江县| 苏尼特右旗| 西昌市| 临西县| 兰西县| 会昌县| 安仁县| 来安县| 德格县| 司法| 潮安县| 台南市| 大理市| 莫力| 大城县| 维西| 玉龙| 双柏县| 义乌市| 申扎县| 拜泉县| 英超| 乡宁县| 盖州市| 富锦市| 神农架林区| 水富县| 昌乐县|