後臺: System.Web.HttpUtility.UrlEncode(string str)
前臺:要自己寫函數了,因爲是公司代碼,我不能提供,告訴你大概
用 charAt 函數對字符編碼,踫到 @#%* 等字符時要另作處理轉爲對應的 %40%23等