window Resize

html 測試 左入右出

html 測試 上入下出

html 測試 單入單出

html 測試 左單右單

display: grid

display: grid 網格顯示
grid-template-columns 網格模板列
grid-template-rows 網格模板行

00
00
00
00

Javascript 字串 或 文章 編碼加密 String or article encoding and encryption 1

Javascript 字串 或 文章 編碼加密
String or article encoding and encryption 1

function encode(str,key) 功能 傳回 字串/文章 編碼加密,
                  str = 需要 編碼加密 字串/文章,
                  key = 密碼。
                  
function decode(str,key) 功能 傳回 將加密編碼還原為 字串/文章,
                  str = 加密後編碼,
                  key = 密碼。
                  
例 : encode("銀行","123456") 
     傳回 "ad9ff3c40c7372664ff58ce086420010015de271"

例 : decode("ad9ff3c40c....086420010015de271","123456")
     傳回 "銀行"

密碼/password

原文 字串/文章 Original string
00
#html #html #script #字串加密 #字串解密 #decode #encode #密碼 password #密碼錯誤 #字串加密編碼 String encryption #加密後字串解碼 String decoding after encryption

Javascript 字串 或 文章 編碼加密 String or article encoding and encryption 2

Javascript 字串 或 文章 編碼加密
String or article encoding and encryption 2

<script src='https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js'></script>
第三方提供 function。
 
CryptoJS.AES.encrypt(str,key).toString() 
           功能 字串/文章 編碼加密,
           傳回 原始字串進行編碼加密,
           str = 需要 編碼加密 字串/文章,
           key = 密碼。

CryptoJS.AES.decrypt(str,key).toString(CryptoJS.enc.Utf8)
           功能 將加密編碼還原為 字串/文章,
           傳回 加密編碼還原為 字串/文章,
           str = 加密後編碼,
           key = 密碼。     
00
#html #html #script #字串加密 #字串解密 #decode #encode #密碼 password #密碼錯誤 #字串加密編碼 String encryption #加密後字串解碼 String decoding after encryption

btoa() / atob() / escape() / unescape()

btoa() / atob() / escape() / unescape()

btoa(str) : 將字串轉換為 Base64 編碼。
atob(str) : 將 Base64 編碼還原回字串。 
       但不支援中文字串。

btoa(str) : Convert string to Base64。
atob(str) : Base64 restore back to string。
       But does not support Chinese text strings。
00


escape()           : 將中文字串轉進行編碼後換為 Base64 編碼 
unescape()         : 將 Base64 編碼還原回轉回中文字串 
btoa(escape(str))  : 將字串轉換為 Base64 編碼
unescape(atob(str)): 將 Base64 編碼還原回字串

加入 escape() / unescape()  中英文都能支援 
Both Chinese and English are supported    
00

長度單位換算

長度單位換算

長度單位換算

00
Edit #html #script #Javascript #公里 km #米 m #厘米 cm #市丈 #市尺 #市寸 #英碼 #英尺 #英寸 #長度換算 #長度轉換 #長度單位 #長度對換 #尺 #寸 #碼