日期:2014-05-17 浏览次数:21090 次
arrChr=array("A","B","C","D","E","F","G","H","I","J") n=830 for i=1 to len(n) s=s&arrChr(mid(n,i,1)) next response.write s
------解决方案--------------------
<% function to_character(str) dim arr,i,n,list arr=split("A|B|C|D|E|F|G|H|I|J","|") for i=1 to len(str) n=mid(str,i,1) if IsNumeric(n) then n=arr(n) end if list=list&n next to_character=list end function Response.write to_character("830")&"<br/>" Response.write to_character("52df12") %>
------解决方案--------------------
<% function n2s(s) abc = ucase("abcdefghij") tmp = "" for i=1 to len(s) tmp = tmp & mid(abc, mid(s, i, 1) + 1, 1) next n2s = tmp end function response.write n2s("830") %> <script type="text/javascript"> String.prototype.test = function(){ var t = this; var s = 'abcdefghij'.toUpperCase(); var a = t.split(''); for(var i =0, len = a.length; i < len; i++){ a[i] = s.charAt(a[i]) } return a.join(''); } alert( '830'.test() ); </script>