如何在c#中编码并在javascript中解码? [英] how to encode in c# and decode in javascript?

查看:103
本文介绍了如何在c#中编码并在javascript中解码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,如果我使用Server.Encode进行编码,如何在Javascript中解码?

Hello, If I were to encode using Server.Encode, how Can I decode that in Javascript?

推荐答案

我不确定是否有确切的用于C#的Server.UrlEncode的JavaScript相反。但是,在JavaScript中,您可以使用decodeURIComponent()。值得注意的是,JS中还有encodeURIComponent()。
I'm not sure if there is an exact opposite in JavaScript for C#'s Server.UrlEncode. However, in JavaScript you can use decodeURIComponent(). Notable, there is also encodeURIComponent() in JS.


这篇关于如何在c#中编码并在javascript中解码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆