C#入门经典上就有这段解释.. 要获得枚举的字符串值,可以使用Convert.ToString()或变量本身的ToString()命令,直接使用(string)数据类型转换时不行的,因为需要进行的处理并不仅仅是把存储在枚举变量的数据放在string变量中。 如果要把string转换为枚举值,可以使用Enum.Parse()进行转换,其使用方式如下: (enumerationType)Enum.Pa... Read More
posted @ 2008-12-01 17:21 liangwei389 Views(420) Comments(0) Diggs(0) Edit
js对文字进行编码涉及3个函数:escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent 1、 传递参数时需要使用encodeURIComponent,这样组合的url才不会被#等特殊字符截断。 例如: 2、 进行url跳转时可以整... Read More
posted @ 2008-12-01 10:39 liangwei389 Views(193) Comments(0) Diggs(0) Edit