|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
你觉得学习.NET怎么样,我懂的少,问的可能很幼稚,见笑了啊:)asp.net|汉字|拼音<scriptlanguage="vbs"src="spellcode.vbs"></script>
猎取客户简称的拼音缩写
functiongetpy()
dimstr
dimi
str=document.all.txtContactName.value
dimret
fori=1tolen(str)
ret=ret&getpychar(mid(str,i,1))
next
document.all.txtSpellCode.value=ret
endfunction
getpychar=char
endif
endfunction
spellCode.vbs
猎取汉字拼音第一字母
functiongetpychar(char)
dimtmp
tmp=65536+asc(char)
if(tmp>=45217andtmp<=45252)then
getpychar="A"
elseif(tmp>=45253andtmp<=45760)then
getpychar="B"
elseif(tmp>=45761andtmp<=46317)then
getpychar="C"
elseif(tmp>=46318andtmp<=46825)then
getpychar="D"
elseif(tmp>=46826andtmp<=47009)then
getpychar="E"
elseif(tmp>=47010andtmp<=47296)then
getpychar="F"
elseif(tmp>=47297andtmp<=47613)then
getpychar="G"
elseif(tmp>=47614andtmp<=48118)then
getpychar="H"
elseif(tmp>=48119andtmp<=49061)then
getpychar="J"
elseif(tmp>=49062andtmp<=49323)then
getpychar="K"
elseif(tmp>=49324andtmp<=49895)then
getpychar="L"
elseif(tmp>=49896andtmp<=50370)then
getpychar="M"
elseif(tmp>=50371andtmp<=50613)then
getpychar="N"
elseif(tmp>=50614andtmp<=50621)then
getpychar="O"
elseif(tmp>=50622andtmp<=50905)then
getpychar="P"
elseif(tmp>=50906andtmp<=51386)then
getpychar="Q"
elseif(tmp>=51387andtmp<=51445)then
getpychar="R"
elseif(tmp>=51446andtmp<=52217)then
getpychar="S"
elseif(tmp>=52218andtmp<=52697)then
getpychar="T"
elseif(tmp>=52698andtmp<=52979)then
getpychar="W"
elseif(tmp>=52980andtmp<=53688)then
getpychar="X"
elseif(tmp>=53689andtmp<=54480)then
getpychar="Y"
elseif(tmp>=54481andtmp<=62289)then
getpychar="Z"
else假如不是中文,则不处置
getpychar=char
endif
endfunction
我之所以想学。NET,是因为一直觉的BILLGATES好厉害,希望有一天能去微软,虽然现在还距离遥远,呵呵:) |
|