ASP - 单身小熊's Blog

使用VML写的梅花图片-制作网页电子地图时使用(IE下才有效)


 

<title>梅花</title>
<meta name="generator" content="Namo WebEditor">
<style>
v\:*{behavior:url(#default#VML);}
</style>
</head>
<body>
<v:group
style="POSITION: absolute; WIDTH: 500px; DISPLAY: block; HEIGHT: 400px; TOP: 110px;lEFT: -16px"
id=Canvas_Data coordsize = "500,400">
<v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 54px;lEFT: -495px"
id=CPoly706  n"11"  s"-495" coordsize =
"300,300"  fillcolor = "maroon" stroked = "f" strokecolor =
"#ffacd6" path =
"m830,73l808,73,781,48,767,10,771,-7,731,-6,748,28,748,38,757,64,780,83,802,100 xe"><v:fill
type = "gradient" color2 = "black"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 40px;lEFT: -448px"
id=CPoly786  n"29"  s"-448" coordsize =
"300,300"  fillcolor = "maroon" stroked = "f" strokecolor =
"#ffacd6" path =
"m984,6l898,4,870,43,858,53,835,84,821,87,780,88,757,94,727,134,716,156,694,176,664,207,632,222,604,242,564,270,549,276,535,277,541,329,584,297,625,278,669,275 718,239,758,184,795,161,848,168,863,150,899,109,934,71,984,39 xe"><v:fill
type = "gradient" color2 = "black"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 44px;lEFT: -429px"
id=CPoly366  n"15"  s"-429" coordsize =
"300,300"  fillcolor = "black" stroked = "f" strokecolor = "#ffacd6"
path =
"m692,74l663,90,635,123,616,146,597,193,584,240,578,301,578,396,563,394,562,317,567,263,576,201,597,133,631,91,682,48 xe"><v:fill
type = "gradientRadial" opacity = "52428f" color2 =
"maroon"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer161  n"5"  s="-1" coordsize = "300,300"
filled = "f" fillcolor = "white" stroked = "f"  path =
"m398,216 c407,215,431,225,410,235,417,236,403,256,378,241,366,255,357,236,357,236,334,246,333,197,368,221,367,207,392,192,398,216e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -2px;lEFT: -1px"
id=CPoly630  n"18"  s"-1" s="-2" coordsize =
"300,300"  fillcolor = "black" strokecolor = "#a52a2a" path =
"m456,142l456,186,453,222,454,248,444,299,433,309,426,332,408,352,381,360,336,421,367,362,381,348,402,342,416,319,437,273,440,234,437,206,435,168 xe"><v:fill
type = "gradient" color2 = "maroon"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 0px;lEFT: 1px"
id=CPoly642  n"17"  coordsize = "300,300" filled =
"t" fillcolor = "#a52a2a" strokecolor = "#a52a2a" path =
"m376,348l362,345,335,337,313,322,308,316,304,294,295,261,292,264,296,279,299,294,303,313,303,321,302,329,314,338,331,351,353,355,368,362 xe"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CPoly820  n"29"  s="-1" coordsize = "300,300"
fillcolor = "#a52a2a" strokecolor = "#a52a2a" path =
"m303,319l288,303,269,292,268,295,291,315,276,326,267,336,253,347,236,355,226,361,214,362,203,371,189,383,168,406,157,423,150,432,150,437,171,410,194,388,212,374,232,366 272,341,275,341,273,355,266,368,270,367,282,340,292,325,304,329 xe"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer186  n"5"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f" strokecolor = "#ffacd6" path =
"m365,212 c377,202,400,232,378,239,385,262,351,260,345,250,336,271,320,251,322,243,279,233,320,192,334,217,339,172,371,200,365,212e"><v:fill
type = "gradientRadial" focus = "30%"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer612  n"5"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m294,175 c308,208,279,192,279,192,266,221,256,194,258,192,233,172,262,162,262,162,276,123,288,143,290,147,326,152,301,175,294,175e"><v:fill
type = "gradient"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer348  n"5"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m173,287 c205,294,183,323,171,312,175,349,152,320,152,320,155,329,131,335,135,309,118,275,145,281,145,283,145,279,173,259,173,287e"><v:fill
type = "gradientRadial"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer831  n"5"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m233,303 c226,304,255,267,264,305,293,316,270,336,261,330,268,365,243,340,243,340,228,358,223,336,224,329,201,301,231,296,233,303e"><v:fill
type = "gradient"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer239  n"5"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m345,328 c363,328,374,362,344,360,344,397,326,374,326,374,321,393,306,387,310,363,306,370,284,349,315,327,310,322,338,278,345,328e"><v:fill
type = "gradient"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -8px;lEFT: -5px"
id=CBeizer742  n"3"  s"-5" s="-8" coordsize =
"300,300"  fillcolor = "fuchsia" stroked = "f"
path =
"m197,191 c197,191,182,201,196,215,201,213,199,199,199,199,199,199,197,191,197,191e"><v:fill
opacity = "13107f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer878  n"3"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m163,171 c158,171,157,182,157,182,157,182,165,190,171,183,172,175,169,171,163,171e"><v:fill
opacity = ".5"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -12px;lEFT: 1px"
id=CBeizer648  n"3"  s="-12" coordsize =
"300,300"  fillcolor = "fuchsia" stroked = "f"
path =
"m113,210 c105,215,108,230,108,230,115,240,118,230,118,230,125,218,113,210,113,210e"><v:fill
opacity = "6553f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -22px;lEFT: 3px"
id=CBeizer448  n"3"  s="-22" coordsize =
"300,300"  fillcolor = "fuchsia" stroked = "f"
path =
"m131,255 c119,256,123,273,127,273,128,270,132,265,132,265,136,259,131,255,131,255e"><v:fill
opacity = "13107f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer469  n"3"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m309,266 c302,273,304,288,304,288,312,288,312,282,312,282,317,272,309,266,309,266e"><v:fill
opacity = "6553f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 2px;lEFT: 3px"
id=CBeizer291  n"3"  coordsize = "300,300" filled
= "t" fillcolor = "fuchsia" stroked = "f"  path =
"m405,303 c405,303,408,293,417,297,422,305,421,303,419,304,410,319,405,303,405,303e"><v:fill
opacity = "13107f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer93  n"3"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m408,356 c416,362,409,379,409,379,409,379,405,379,403,370,401,364,408,356,408,356e"><v:fill
opacity = "13107f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer558  n"3"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m335,405 c335,400,327,399,327,399,327,399,321,405,323,410,332,420,338,409,335,405e"><v:fill
opacity = "13107f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer905  n"3"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m279,355 c279,355,289,359,281,374,278,374,275,369,275,369,274,359,279,355,279,355e"><v:fill
opacity = "13107f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer312  n"3"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m226,398 c226,398,236,411,224,417,222,413,220,407,220,407,221,396,226,398,226,398e"><v:fill
opacity = "13107f"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CPoly294  n"14"  s="-1" coordsize = "300,300"
fillcolor = "#a52a2a" stroked = "f"  path =
"m233,366l227,379,217,391,207,404,199,416,195,431,198,431,198,423,203,417,218,396,226,387,234,373,248,362,267,344 xe"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 14px; HEIGHT: 52px; TOP: 0px;lEFT: 0px"
coordsize = "14,52"  fillcolor = "#a52a2a" strokecolor =
"#a52a2a" path =
"m225,388l225,388,225,389,225,390,225,391,225,392,226,393,226,394,226,395,226,396,226,397,225,398,225,397,224,397,224,396,224,395,224,394,224,393,224,392,224,391,224,390 224,389,223,389,223,388,223,387,223,386e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -17px;lEFT: -4px"
id=CPoly427  n"14"  s"-4" s="-17" coordsize =
"300,300"  fillcolor = "#a52a2a" stroked = "f"
path =
"m199,275l183,260,169,253,146,245,131,239,120,240,106,241,106,248,118,247,132,248,142,252,164,257,182,266,191,279 xe"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CBeizer932  n"5"  s="-1" coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f"  path =
"m203,378 c229,403,207,432,192,407,176,438,173,400,172,404,171,410,137,417,159,386,149,380,156,351,175,366,178,345,209,336,203,378e"><v:fill
type = "gradientRadial"></v:fill></v:shape>
<v:shape
style="POSITION: absolute; WIDTH: 16px; HEIGHT: 10px; TOP: 0px;lEFT: 0px"
coordsize = "16,10" filled = "f" fillcolor = "white" strokecolor =
"#ffacd6" path =
"m335,411l335,411,335,410,337,409,337,408,338,408,339,408,340,408,341,408,342,408,342,409,342,410,342,411,341,412,340,412,339,412,338,412,337,411,336,411,336,410,335,410e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 52px;lEFT: -464px"
id=CBeizer661  n"5"  s"-464" coordsize =
"300,300"  fillcolor = "yellow" stroked = "f"
path =
"m820,164 c820,164,830,165,827,181,826,186,810,184,810,184,810,184,792,177,792,177,786,166,799,160,799,160,799,160,820,164,820,164e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 59px;lEFT: -451px"
id=CBeizer287  n"5"  s"-451" coordsize =
"300,300"  fillcolor = "yellow" stroked = "f"
path =
"m726,122 c726,122,743,113,743,113,743,105,734,101,734,101,734,101,718,106,718,106,718,106,715,117,715,117,715,117,726,122,726,122e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 42px;lEFT: -459px"
id=CBeizer644  n"4"  s"-459" coordsize =
"300,300"  fillcolor = "yellow" stroked = "f"
path =
"m801,295 c802,302,800,308,800,308,800,308,777,328,777,327,777,326,776,303,777,294,785,292,800,285,801,295e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 41px;lEFT: -437px"
id=CPoly740  n"7"  s"-437" coordsize = "300,300"
fillcolor = "yellow" stroked = "f"  path =
"m630,336l631,355,620,357,614,350,605,345,613,335,620,326 xe"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 44px;lEFT: -431px"
id=CPoly408  n"7"  s"-431" coordsize = "300,300"
fillcolor = "yellow" stroked = "f"  path =
"m598,248l603,258,599,263,591,262,585,262,576,252,583,243 xe"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 42px;lEFT: -444px"
id=CPoly154  n"6"  s"-444" coordsize = "300,300"
fillcolor = "yellow" stroked = "f"  path =
"m698,265l704,277,698,282,687,282,677,272,684,263 xe"><v:fill
type = "solid"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 45px;lEFT: -446px"
id=CPoly94  n"18" s"-446" coordsize = "300,300"
fillcolor = "#f60" stroked = "f"  path =
"m685,265l683,266,685,267,689,272,692,275,695,275,696,272,699,272,699,270,695,271,695,269,698,268,697,266,693,271,692,270,695,265,692,264,691,269,689,269,685,265e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -1px;lEFT: 0px"
id=CPoly41  s="-1" coordsize = "300,300" filled = "f" fillcolor =
"white"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 7px;lEFT: -289px"
id=CPoly542  n"24" s"-289" coordsize = "300,300"
fillcolor = "#f90" stroked = "f" strokecolor = "#930" path =
"m616,344l620,347,621,347,623,346,628,346,628,344,626,343,623,344,622,343,624,341,626,339,624,338,621,341,621,342,620,342,620,341,622,335,621,334,619,337,618,341,618,343 614,337,612,334,611,336,613,338,616,344e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 49px;lEFT: -433px"
id=CPoly835  n"22" s"-433" coordsize = "300,300"
fillcolor = "#f60" stroked = "f"  path =
"m587,252l590,255,592,255,594,253,598,253,598,250,594,251,592,251,595,250,596,248,596,247,594,247,592,248,592,249,591,249,592,246,593,244,590,245,590,248,589,249,586,246 584,245,583,246,587,252e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 2px;lEFT: -532px"
n"25" s"-532" coordsize = "300,300"  fillcolor =
"#f90" stroked = "f"  path =
"m810,175l812,174,815,173,818,172,818,169,814,171,813,171,812,169,815,167,816,165,813,165,811,170,810,171,810,168,812,163,810,162,808,166,808,170,807,170,805,167,803,165 801,166,801,167,803,169,805,171,807,173,810,175e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 56px;lEFT: -465px"
n"25" s"-465" coordsize = "300,300"  fillcolor =
"#f90" stroked = "f"  path =
"m810,175l812,174,815,173,818,172,818,169,814,171,813,171,812,169,815,167,816,165,813,165,811,170,810,171,810,168,812,163,810,162,808,166,808,170,807,170,805,167,803,165 801,166,801,167,803,169,805,171,807,173,810,175e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 44px;lEFT: -438px"
n"24" s"-438" coordsize = "300,300"  fillcolor =
"#f90" stroked = "f" strokecolor = "#930" path =
"m616,344l620,347,621,347,623,346,628,346,628,344,626,343,623,344,622,343,624,341,626,339,624,338,621,341,621,342,620,342,620,341,622,335,621,334,619,337,618,341,618,343 614,337,612,334,611,336,613,338,616,344e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 42px;lEFT: 100px"
n"5"  coordsize = "300,300"
fillcolor = "fuchsia" stroked = "f" strokecolor = "#ffacd6" path =
"m365,212 c377,202,400,232,378,239,385,262,351,260,345,250,336,271,320,251,322,243,279,233,320,192,334,217,339,172,371,200,365,212e"><v:fill
type = "gradientRadial" focus = "30%"></v:fill></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: 99px;lEFT: -359px"
n"5"  s"-359" coordsize = "300,300" filled =
"t" fillcolor = "yellow" stroked = "f"  path =
"m820,164 c820,164,830,165,827,181,826,186,810,184,810,184,810,184,792,177,792,177,786,166,799,160,799,160,799,160,820,164,820,164e"></v:shape><v:shape
style="POSITION: absolute; WIDTH: 300px; HEIGHT: 300px; TOP: -68px;lEFT: -169px"
n"24" s"-169" s="-68" coordsize = "300,300"
fillcolor = "#f90" stroked = "f" strokecolor = "#930" path =
"m616,344l620,347,621,347,623,346,628,346,628,344,626,343,623,344,622,343,624,341,626,339,624,338,621,341,621,342,620,342,620,341,622,335,621,334,619,337,618,341,618,343 614,337,612,334,611,336,613,338,616,344e"></v:shape></v:group></v:group>

网页在线打印使用WScript,有权限限制(仅IE下有效)

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<!--media=print 这个属性可以在打印时有效--> 
<style media=print> 
.Noprint{display:none;} 
.PageNext{page-break-after: always;} 
</style> 

<style> 
.tdp 
{ 
border-bottom: 1 solid #000000; 
border-left: 1 solid #000000; 
border-right: 0 solid #ffffff; 
border-top: 0 solid #ffffff; 
} 
.tabp 
{ 
border-color: #000000 #000000 #000000 #000000; 
border-style: solid; 
border-top-width: 2px; 
border-right-width: 2px; 
border-bottom-width: 1px; 
border-left-width: 1px; 
} 
.NOPRINT { 
font-family: "宋体"; 
font-size: 9pt; 
} 

</style> 

</head> 

<body > 
<center class="Noprint" > 
<p> 
<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0> 
</OBJECT> 
<input type=button value=打印 onclick=document.all.WebBrowser.ExecWB(6,1)> 
<input type=button value=直接打印 onclick=document.all.WebBrowser.ExecWB(6,6)> 
<input type=button value=页面设置 onclick=document.all.WebBrowser.ExecWB(8,1)> 
</p> 
<p> <input type=button value=打印预览 onclick=document.all.WebBrowser.ExecWB(7,1)> 
<br/> 
</p> 
<hr align="center" width="90%" size="1" noshade> 
</center> 

<table width="90%" border="0" align="center" cellpadding="2" cellspacing="0" class="tabp"> 
<tr> 
<td colspan="3" class="tdp">第1页</td> 
</tr> 
<tr> 
<td width="29%" class="tdp"> </td> 
<td width="28%" class="tdp"> </td> 
<td width="43%" class="tdp"> </td> 
</tr> 
<tr> 
<td colspan="3" class="tdp"> </td> 
</tr> 
<tr> 
<td colspan="3" class="tdp"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
<tr> 
<td width="50%" class="tdp"><p>这样的报表</p> 
<p>对一般的要求就够了。</p></td> 
<td> </td> 
</tr> 
</table></td> 
</tr> 
</table> 
<hr align="center" width="90%" size="1" noshade class="NOPRINT" > 
<!--分页--> 
<div class="PageNext"></div> 
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="0" class="tabp"> 
<tr> 
<td class="tdp">第2页</td> 
</tr> 
<tr> 
<td class="tdp">看到分页了吧</td> 
</tr> 
<tr> 
<td class="tdp"> </td> 
</tr> 
<tr> 
<td class="tdp"> </td> 
</tr> 
<tr> 
<td class="tdp"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
<tr> 
<td width="50%" class="tdp"><p>这样的报表</p> 
<p>对一般的要求就够了。</p></td> 
<td> </td> 
</tr> 
</table></td> 
</tr> 
</table> 
</body> 
</html> 


ASP页面打印时如何去掉页面底部的路径和顶端的页码编号 
(1)ie的文件-〉页面设置-〉讲里面的页眉和页脚里面的东西都去掉,打印就不出来了。 
(2)<HTML> 
<HEAD> 
<TITLE> New Document </TITLE> 
<META NAME="Generator" CONTENT="EditPlus"> 
<META NAME="Author" CONTENT="YC"> 
<script language="VBScript"> 
dim hkey_root,hkey_path,hkey_key 
hkey_root="HKEY_CURRENT_USER" 
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup" 
'//设置网页打印的页眉页脚为空 
function pagesetup_null() 
on error resume next 
Set RegWsh = CreateObject("WScript.Shell") 
hkey_key="\header" 
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"" 
hkey_key="\footer" 
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"" 
end function 
'//设置网页打印的页眉页脚为默认值 
function pagesetup_default() 
on error resume next 
Set RegWsh = CreateObject("WScript.Shell") 
hkey_key="\header" 
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P" 
hkey_key="\footer" 
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&u&b&d" 
end function 
</script> 
</HEAD> 

<BODY> 
<br/> 
<br/> 
<br/> 
<br/> 
<br/> 
<br/><p align=center> 
<input type="button" value="清空页码" onclick=pagesetup_null()> <input type="button" value="恢复页吗" onclick=pagesetup_default()><br/> 
 

</p>  

选择下拉框(添加/删除/上移/下移动)的效果(2)

 

 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Select 排序,移动等</title>
<style>
.ecv_autoSizeDropDown
{
    font-family    : "Arial", "Helvetica", "sans-serif"; 
    font-size    : 12px;
    font-style    : normal;
    color        : #201B74;
    background-color: #FFFFFF;    
    width:expression((this.offsetWidth>150)?'auto':'150');
}
</style>
</head> 
<body >

<div style="font-size:10pt;">
注1:左右移动进行选取 <br/>      
注2:已解决的问题 <br/>      
----能进行多行排序<br/> 

----解决排序时滚动条归零的问题<br/> 
<br/> 
<br/>
注:本页面仅在IE6/FireFox1.5下测试过。其它浏览器或其它版本未经测试。<br/>       
原作者:JK:<a href="mailTo:jk_10000@yahoo.com.cn?subject=About%20MoveRightOrLeft">JK_10000@yahoo.com.cn</a><br/>    
<hr/>
</div>

<form name=frm>

<table>
<tr > 
    <td> 
        <select name=SrcSelect size=6 class="ecv_autoSizeDropDown" style="height:160px;" multiple ondblclick="moveLeftOrRight(document.frm.SrcSelect,document.frm.ObjSelect)"> 
            <option value="1">test1</option> 
            <option value="2">test2</option> 
            <option value="3">test3</option> 
            <option value="4">test4</option> 
            <option value="5">test5</option> 
            <option value="6">test6</option> 
            <option value="7">test7</option> 
            <option value="8">test8</option> 
            <option value="9">test9 abcde abcde abcde abcde abcde abcde abcde abcde </option> 
        </select>

    </td> 
    <td width="30px">    
        <input align="left" type=button value=">>" onclick="moveLeftOrRightAll(document.frm.SrcSelect,document.frm.ObjSelect)" ><br><br>
        <input align="left" type=button value=">" onclick="moveLeftOrRight(document.frm.SrcSelect,document.frm.ObjSelect)" ><br><br>
        <input align="left" type=button value="<" onclick="moveLeftOrRight(document.frm.ObjSelect,document.frm.SrcSelect)" ><br><br>
        <input align="left" type=button value="<<" onclick="moveLeftOrRightAll(document.frm.ObjSelect,document.frm.SrcSelect)" >
    </td>
    <td> 
        <select name=ObjSelect size=6 class="ecv_autoSizeDropDown" style="height:160px;" multiple ondblclick="moveLeftOrRight(document.frm.ObjSelect,document.frm.SrcSelect)"> 
            <option value="11">test11</option> 
            <option value="12">test12</option> 
            <option value="13">test13</option> 
            <option value="14">test14</option> 
            <option value="15">test15</option> 
            <option value="16">test16</option> 
        </select>

    </td> 
    <td width="30px">
        <input type=button value="AA" onclick="moveToTop(document.frm.ObjSelect)" > <br><br> 
        <input type=button value="A" onclick="moveUp(document.frm.ObjSelect)" > <br><br> 
        <input type=button value="V" onclick="moveDown(document.frm.ObjSelect)" ><br><br> 
        <input type=button value="VV" onclick="moveToBottom(document.frm.ObjSelect)" >

    </td>
</tr> 
</table>

</form>

<script language=javascript> 

function moveLeftOrRight(fromObj,toObj) 
{
    var fromObjOptions=fromObj.options;
    for(var i=0;i<fromObjOptions.length;i++){
        if(fromObjOptions[i].selected){
            toObj.appendChild(fromObjOptions[i]);
            i--;
        }
    }
    resetAutoWidth(fromObj);
    resetAutoWidth(toObj);
} 

function moveLeftOrRightAll(fromObj,toObj) 
{
    var fromObjOptions=fromObj.options;
    if(fromObjOptions.length>1000) {
        //if(!confirm("Are you sure to move options?")) return false;
    }
    for(var i=0;i<fromObjOptions.length;i++){
        fromObjOptions[0].selected=true;
        toObj.appendChild(fromObjOptions[i]);
        i--;
    }
    resetAutoWidth(fromObj);
    resetAutoWidth(toObj);
} 

function moveUp(selectObj) 
{ 
    var theObjOptions=selectObj.options;
    for(var i=1;i<theObjOptions.length;i++) {
        if( theObjOptions[i].selected && !theObjOptions[i-1].selected ) {
            swapOptionProperties(theObjOptions[i],theObjOptions[i-1]);
        }
    }
} 

function moveDown(selectObj) 
{ 
    var theObjOptions=selectObj.options;
    for(var i=theObjOptions.length-2;i>-1;i--) {
        if( theObjOptions[i].selected && !theObjOptions[i+1].selected ) {
            swapOptionProperties(theObjOptions[i],theObjOptions[i+1]);
        }
    }
} 

function moveToTop(selectObj){
    var theObjOptions=selectObj.options;
    var oOption=null;
    for(var i=0;i<theObjOptions.length;i++) {
        if( theObjOptions[i].selected && oOption) {
            selectObj.insertBefore(theObjOptions[i],oOption);
        }
        else if(!oOption && !theObjOptions[i].selected) {
            oOption=theObjOptions[i];
        }
    }
}

function moveToBottom(selectObj){
    var theObjOptions=selectObj.options;
    var oOption=null;
    for(var i=theObjOptions.length-1;i>-1;i--) {
        if( theObjOptions[i].selected ) {
            if(oOption) {
                oOption=selectObj.insertBefore(theObjOptions[i],oOption);
            }
            else oOption=selectObj.appendChild(theObjOptions[i]);
        }
    }

}

function selectAllOption(selectObj){
    var theObjOptions=selectObj.options;
    for(var i=0;i<theObjOptions.length;i++){
        theObjOptions[0].selected=true;
    }
}

/* private function */
function swapOptionProperties(option1,option2){
    //option1.swapNode(option2);
    var tempStr=option1.value;
    option1.value=option2.value;
    option2.value=tempStr;
    tempStr=option1.text;
    option1.text=option2.text;
    option2.text=tempStr;
    tempStr=option1.selected;
    option1.selected=option2.selected;
    option2.selected=tempStr;
}

function resetAutoWidth(obj){
    var tempWidth=obj.style.getExpression("width");
    if(tempWidth!=null) {
        obj.style.width="auto";
        obj.style.setExpression("width",tempWidth);
        obj.style.width=null;
    }
}

</script> 
</body> 
</html>

 

选择下拉框(添加/删除/上移/下移动)的效果(1)

<html>	
<HEAD>
<TITLE>选择下拉菜单</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Description" CONTENT="Power by hill">
</HEAD>
<BODY>
<p>选定一项或多项然后点击添加或移除(按住shift或ctrl可以多选),或在选择项上双击进行添加和移除。</p>
<form method="post" name="myform">
<table border="0" width="300">
<tr>
<td width="40%">
<select style="WIDTH:100%" multiple name="list1" size="12" ondblclick="moveOption(document.myform.list1, document.myform.list2)">
<option value="北京">北京</option>
<option value="上海">上海</option>
<option value="山东">山东</option>
<option value="安徽">安徽</option>
<option value="重庆">重庆</option>
<option value="福建">福建</option>
<option value="甘肃">甘肃</option>
<option value="广东">广东</option>
<option value="广西">广西</option>
<option value="贵州">贵州</option>
<option value="海南">海南</option>
<option value="河北">河北</option>
<option value="黑龙江">黑龙江</option>
<option value="河南">河南</option>
<option value="湖北">湖北</option>
<option value="湖南">湖南</option>
<option value="内蒙古">内蒙古</option>
<option value="江苏">江苏</option>
<option value="江西">江西</option>
<option value="吉林">吉林</option>
<option value="辽宁">辽宁</option>
<option value="宁夏">宁夏</option>
<option value="青海">青海</option>
<option value="山西">山西</option>
<option value="陕西">陕西</option>
<option value="四川">四川</option>
<option value="天津">天津</option>
<option value="西藏">西藏</option>
<option value="新疆">新疆</option>
<option value="云南">云南</option>
<option value="浙江">浙江</option>
<option value="香港">香港</option>
<option value="澳门">澳门</option>
<option value="台湾">台湾</option>
<option value="其他">其他</option>
</select>
</td>
<td width="20%" align="center">
<input type="button" value="添加" onclick="moveOption(document.myform.list1, document.myform.list2)"><br/>
<br/>
<input type="button" value="删除" onclick="moveOption(document.myform.list2, document.myform.list1)">
</td>
<td width="40%">
<select style="WIDTH:100%" multiple name="list2" size="12" ondblclick="moveOption(document.myform.list2, document.myform.list1)">
</select>
</td>
<td>
<button onclick="changepos(list2,-1)" type="button">上移</button>
<br/>
<button onclick="changepos(list2,1)" type="button">下移</button>
</td>
</tr>
</table>
值:<input type="text" name="city" size="40">
</form>
<script language="JavaScript">
<!--
function moveOption(e1, e2){
try{
for(var i=0;i<e1.options.length;i++){
if(e1.options[i].selected){
var e = e1.options[i];
e2.options.add(new Option(e.text, e.value));
e1.remove(i);
i=i-1
}
}
document.myform.city.value=getvalue(document.myform.list2);
}
catch(e){}
}
function getvalue(geto){
var allvalue = "";
for(var i=0;i<geto.options.length;i++){
allvalue +=geto.options[i].value + ",";
}
return allvalue;
}
function changepos(obj,index)
{
if(index==-1){
if (obj.selectedIndex>0){
obj.options(obj.selectedIndex).swapNode(obj.options(obj.selectedIndex-1))
}
}
else if(index==1){
if (obj.selectedIndex<obj.options.length-1){
obj.options(obj.selectedIndex).swapNode(obj.options(obj.selectedIndex+1))
}
}
}
//-->
</script>
</BODY>
</HTML>

 

可搜索输入的下拉框(下拉菜单)

 可搜索输入的下拉框(下拉菜单)

效果:

<HTML> 
	<HEAD> 
		<TITLE>可搜索输入的下拉框(下拉菜单)</TITLE> 
	</HEAD> 
	<Script Language="JavaScript"> 
		<!--
		   var whichText;
		   function selectStation(obj) {
		   	   var objSelStation = obj;
		       if (obj.selectedIndex != -1) {
		           var stationName = obj.options[obj.selectedIndex].text;
		           whichText.value = stationName;
		       }
		       var stobj= document.getElementsByName('hospitalCode')[0];
		       //鼠标单击某一选项选定后关闭下拉框
		       showDivStation(this, false,'hospitalCode')
		    }
		
			//响应text的事件
		   	var pageD =0, pageU;
		   	function similarFind(txtObj,seledName) {
		        var curStationName = txtObj.value;
		        var objSelStation = document.getElementsByName(seledName)[0];
		        var stationLength = objSelStation.options.length;
		        var flag = true;
		   		pageU = pageD;
		        //从起始的文字匹配 用text中的数据跟下拉框中的数据
		        for (var i=0; i<stationLength; i++) {
		            var stationName = objSelStation.options[i].text;
		            var re = new RegExp("^" + curStationName);
		       		if (stationName.match(re)) {
		                if (i<stationLength - 10) {
		                    objSelStation.selectedIndex = i + 10;
		                }
		                objSelStation.selectedIndex = i;
		       			pageD = i;
		       			pageU = i;
		       			flag = false;
		                break;
		            }
		        }
		        ////从文字中匹配 用text中的数据跟下拉框中的数据
		        if(flag) {
		        	for (var i=0; i<stationLength; i++) {
			            var stationName = objSelStation.options[i].text;
			            var re2 = new RegExp("^.*" + curStationName+'.*$');
			       		if (stationName.match(re2)) {
			                if (i<stationLength - 10) {
			                    objSelStation.selectedIndex = i + 10;
			                }
			                objSelStation.selectedIndex = i;
			       			pageD = i;
			       			pageU = i;
			                break;
			            }
		        	}
		        }
				//响应下移键
			   	if(event.keyCode==40) {
			     	pageD++;
			     	if(pageD==objSelStation.options.length) pageD=0;
			     	txtObj.value=objSelStation.options[pageD].text ;
			     	objSelStation.selectedIndex = pageD;
			   	}
				//响应上移键
			   	if(event.keyCode==38) {
			     	--pageU;
			     	if(pageU<0) pageU=objSelStation.options.length-1;
			     	txtObj.value = objSelStation.options[pageU].text;
			     	objSelStation.selectedIndex = pageU;
			    }
			}
			//下拉框显示位置
		    function showDivStation(obj, b,selName) {
		        var divStation = document.getElementsByName(selName)[0]
		        if (b) {
		           whichText = obj;
		           divStation.style.display="block";
		           similarFind(obj,selName);
		        } else {
		           divStation.style.display="none";
		        }
		    }
		    
		    function removeNull(node) {
		    	if(node.value=='--未选择--') 
		    	node.value = '';
		    }
		//--> 
	</Script> 
	<BODY bgcolor="#FFFFFF" topmargin="0" leftmargin="0"> 
		<form name="caseLhBaseForm"> 
			<table> 
				<tr> 
					<td valign="top">医院</TD> 
					<td> 
						<input type="text" name="hospitalCodeName" 

							style="width: 330px"

							onfocus="showDivStation(this, true,'hospitalCode')" 

							onclick="removeNull(this)"

							onkeyup="similarFind(this,'hospitalCode')" 

							value="--未选择--"> 
						<select size="6" name="hospitalCode"

							style="display: none; width: 330px;"

							onclick="selectStation(this)"> 
							<option value="">--未选择--</option> 
							<option value="340403007">北京上地医院</option> 
							<option value="340402006">北京回龙观医院</option> 
							<option value="340401005">北京中关村医院</option> 
							<option value="340401005">上地第二医院</option> 
							<option value="340403007">回龙观第二医院</option> 
							<option value="340402006">朝阳医院</option> 
							<option value="340401005">海淀医院</option> 
							<option value="340401005">东城区医院</option> 
						</select> 
					</td> 
				</tr> 
			</table> 
		</form> 
	</BODY> 
</HTML>

GB汉字中文转换拼音

 

  1. <%
  2. '----------------汉字转拼音-----------------
  3. Set d = CreateObject("Scripting.Dictionary")
  4. d.Add "A", -20319
  5. d.Add "Ai", -20317
  6. d.Add "An", -20304
  7. d.Add "Ang", -20295
  8. d.Add "Ao", -20292
  9. d.Add "Ba", -20283
  10. d.Add "Bai", -20265
  11. d.Add "Ban", -20257
  12. d.Add "Bang", -20242
  13. d.Add "Bao", -20230
  14. d.Add "Bei", -20051
  15. d.Add "Ben", -20036
  16. d.Add "Beng", -20032
  17. d.Add "Bi", -20026
  18. d.Add "Bian", -20002
  19. d.Add "Biao", -19990
  20. d.Add "Bie", -19986
  21. d.Add "Bin", -19982
  22. d.Add "Bing", -19976
  23. d.Add "Bo", -19805
  24. d.Add "Bu", -19784
  25. d.Add "Ca", -19775
  26. d.Add "Cai", -19774
  27. d.Add "Can", -19763
  28. d.Add "Cang", -19756
  29. d.Add "Cao", -19751
  30. d.Add "Ce", -19746
  31. d.Add "Ceng", -19741
  32. d.Add "Cha", -19739
  33. d.Add "Chai", -19728
  34. d.Add "Chan", -19725
  35. d.Add "Chang", -19715
  36. d.Add "Chao", -19540
  37. d.Add "Che", -19531
  38. d.Add "Chen", -19525
  39. d.Add "Cheng", -19515
  40. d.Add "Chi", -19500
  41. d.Add "Chong", -19484
  42. d.Add "Chou", -19479
  43. d.Add "Chu", -19467
  44. d.Add "Chuai", -19289
  45. d.Add "Chuan", -19288
  46. d.Add "Chuang", -19281
  47. d.Add "Chui", -19275
  48. d.Add "Chun", -19270
  49. d.Add "Chuo", -19263
  50. d.Add "Ci", -19261
  51. d.Add "Cong", -19249
  52. d.Add "Cou", -19243
  53. d.Add "Cu", -19242
  54. d.Add "Cuan", -19238
  55. d.Add "Cui", -19235
  56. d.Add "Cun", -19227
  57. d.Add "Cuo", -19224
  58. d.Add "Da", -19218
  59. d.Add "Dai", -19212
  60. d.Add "Dan", -19038
  61. d.Add "Dang", -19023
  62. d.Add "Dao", -19018
  63. d.Add "De", -19006
  64. d.Add "Deng", -19003
  65. d.Add "Di", -18996
  66. d.Add "Dian", -18977
  67. d.Add "Diao", -18961
  68. d.Add "Die", -18952
  69. d.Add "Ding", -18783
  70. d.Add "Diu", -18774
  71. d.Add "Dong", -18773
  72. d.Add "Dou", -18763
  73. d.Add "Du", -18756
  74. d.Add "Duan", -18741
  75. d.Add "Dui", -18735
  76. d.Add "Dun", -18731
  77. d.Add "Duo", -18722
  78. d.Add "E", -18710
  79. d.Add "En", -18697
  80. d.Add "Er", -18696
  81. d.Add "Fa", -18526
  82. d.Add "Fan", -18518
  83. d.Add "Fang", -18501
  84. d.Add "Fei", -18490
  85. d.Add "Fen", -18478
  86. d.Add "Feng", -18463
  87. d.Add "Fo", -18448
  88. d.Add "Fou", -18447
  89. d.Add "Fu", -18446
  90. d.Add "Ga", -18239
  91. d.Add "Gai", -18237
  92. d.Add "Gan", -18231
  93. d.Add "Gang", -18220
  94. d.Add "Gao", -18211
  95. d.Add "Ge", -18201
  96. d.Add "Gei", -18184
  97. d.Add "Gen", -18183
  98. d.Add "Geng", -18181
  99. d.Add "Gong", -18012
  100. d.Add "Gou", -17997
  101. d.Add "Gu", -17988
  102. d.Add "Gua", -17970
  103. d.Add "Guai", -17964
  104. d.Add "Guan", -17961
  105. d.Add "Guang", -17950
  106. d.Add "Gui", -17947
  107. d.Add "Gun", -17931
  108. d.Add "Guo", -17928
  109. d.Add "Ha", -17922
  110. d.Add "Hai", -17759
  111. d.Add "Han", -17752
  112. d.Add "Hang", -17733
  113. d.Add "Hao", -17730
  114. d.Add "He", -17721
  115. d.Add "Hei", -17703
  116. d.Add "Hen", -17701
  117. d.Add "Heng", -17697
  118. d.Add "Hong", -17692
  119. d.Add "Hou", -17683
  120. d.Add "Hu", -17676
  121. d.Add "Hua", -17496
  122. d.Add "Huai", -17487
  123. d.Add "Huan", -17482
  124. d.Add "Huang", -17468
  125. d.Add "Hui", -17454
  126. d.Add "Hun", -17433
  127. d.Add "Huo", -17427
  128. d.Add "Ji", -17417
  129. d.Add "Jia", -17202
  130. d.Add "Jian", -17185
  131. d.Add "Jiang", -16983
  132. d.Add "Jiao", -16970
  133. d.Add "Jie", -16942
  134. d.Add "Jin", -16915
  135. d.Add "Jing", -16733
  136. d.Add "Jiong", -16708
  137. d.Add "Jiu", -16706
  138. d.Add "Ju", -16689
  139. d.Add "Juan", -16664
  140. d.Add "Jue", -16657
  141. d.Add "Jun", -16647
  142. d.Add "Ka", -16474
  143. d.Add "Kai", -16470
  144. d.Add "Kan", -16465
  145. d.Add "Kang", -16459
  146. d.Add "Kao", -16452
  147. d.Add "Ke", -16448
  148. d.Add "Ken", -16433
  149. d.Add "Keng", -16429
  150. d.Add "Kong", -16427
  151. d.Add "Kou", -16423
  152. d.Add "Ku", -16419
  153. d.Add "Kua", -16412
  154. d.Add "Kuai", -16407
  155. d.Add "Kuan", -16403
  156. d.Add "Kuang", -16401
  157. d.Add "Kui", -16393
  158. d.Add "Kun", -16220
  159. d.Add "Kuo", -16216
  160. d.Add "La", -16212
  161. d.Add "Lai", -16205
  162. d.Add "Lan", -16202
  163. d.Add "Lang", -16187
  164. d.Add "Lao", -16180
  165. d.Add "Le", -16171
  166. d.Add "Lei", -16169
  167. d.Add "Leng", -16158
  168. d.Add "Li", -16155
  169. d.Add "Lia", -15959
  170. d.Add "Lian", -15958
  171. d.Add "Liang", -15944
  172. d.Add "Liao", -15933
  173. d.Add "Lie", -15920
  174. d.Add "Lin", -15915
  175. d.Add "Ling", -15903
  176. d.Add "Liu", -15889
  177. d.Add "Long", -15878
  178. d.Add "Lou", -15707
  179. d.Add "Lu", -15701
  180. d.Add "Lv", -15681
  181. d.Add "Luan", -15667
  182. d.Add "Lue", -15661
  183. d.Add "Lun", -15659
  184. d.Add "Luo", -15652
  185. d.Add "Ma", -15640
  186. d.Add "Mai", -15631
  187. d.Add "Man", -15625
  188. d.Add "Mang", -15454
  189. d.Add "Mao", -15448
  190. d.Add "Me", -15436
  191. d.Add "Mei", -15435
  192. d.Add "Men", -15419
  193. d.Add "Meng", -15416
  194. d.Add "Mi", -15408
  195. d.Add "Mian", -15394
  196. d.Add "Miao", -15385
  197. d.Add "Mie", -15377
  198. d.Add "Min", -15375
  199. d.Add "Ming", -15369
  200. d.Add "Miu", -15363
  201. d.Add "Mo", -15362
  202. d.Add "Mou", -15183
  203. d.Add "Mu", -15180
  204. d.Add "Na", -15165
  205. d.Add "Nai", -15158
  206. d.Add "Nan", -15153
  207. d.Add "Nang", -15150
  208. d.Add "Nao", -15149
  209. d.Add "Ne", -15144
  210. d.Add "Nei", -15143
  211. d.Add "Nen", -15141
  212. d.Add "Neng", -15140
  213. d.Add "Ni", -15139
  214. d.Add "Nian", -15128
  215. d.Add "Niang", -15121
  216. d.Add "Niao", -15119
  217. d.Add "Nie", -15117
  218. d.Add "Nin", -15110
  219. d.Add "Ning", -15109
  220. d.Add "Niu", -14941
  221. d.Add "Nong", -14937
  222. d.Add "Nu", -14933
  223. d.Add "Nv", -14930
  224. d.Add "Nuan", -14929
  225. d.Add "Nue", -14928
  226. d.Add "Nuo", -14926
  227. d.Add "O", -14922
  228. d.Add "Ou", -14921
  229. d.Add "Pa", -14914
  230. d.Add "Pai", -14908
  231. d.Add "Pan", -14902
  232. d.Add "Pang", -14894
  233. d.Add "Pao", -14889
  234. d.Add "Pei", -14882
  235. d.Add "Pen", -14873
  236. d.Add "Peng", -14871
  237. d.Add "Pi", -14857
  238. d.Add "Pian", -14678
  239. d.Add "Piao", -14674
  240. d.Add "Pie", -14670
  241. d.Add "Pin", -14668
  242. d.Add "Ping", -14663
  243. d.Add "Po", -14654
  244. d.Add "Pu", -14645
  245. d.Add "Qi", -14630
  246. d.Add "Qia", -14594
  247. d.Add "Qian", -14429
  248. d.Add "Qiang", -14407
  249. d.Add "Qiao", -14399
  250. d.Add "Qie", -14384
  251. d.Add "Qin", -14379
  252. d.Add "Qing", -14368
  253. d.Add "Qiong", -14355
  254. d.Add "Qiu", -14353
  255. d.Add "Qu", -14345
  256. d.Add "Quan", -14170
  257. d.Add "Que", -14159
  258. d.Add "Qun", -14151
  259. d.Add "Ran", -14149
  260. d.Add "Rang", -14145
  261. d.Add "Rao", -14140
  262. d.Add "Re", -14137
  263. d.Add "Ren", -14135
  264. d.Add "Reng", -14125
  265. d.Add "Ri", -14123
  266. d.Add "Rong", -14122
  267. d.Add "Rou", -14112
  268. d.Add "Ru", -14109
  269. d.Add "Ruan", -14099
  270. d.Add "Rui", -14097
  271. d.Add "Run", -14094
  272. d.Add "Ruo", -14092
  273. d.Add "Sa", -14090
  274. d.Add "Sai", -14087
  275. d.Add "San", -14083
  276. d.Add "Sang", -13917
  277. d.Add "Sao", -13914
  278. d.Add "Se", -13910
  279. d.Add "Sen", -13907
  280. d.Add "Seng", -13906
  281. d.Add "Sha", -13905
  282. d.Add "Shai", -13896
  283. d.Add "Shan", -13894
  284. d.Add "Shang", -13878
  285. d.Add "Shao", -13870
  286. d.Add "She", -13859
  287. d.Add "Shen", -13847
  288. d.Add "Sheng", -13831
  289. d.Add "Shi", -13658
  290. d.Add "Shou", -13611
  291. d.Add "Shu", -13601
  292. d.Add "Shua", -13406
  293. d.Add "Shuai", -13404
  294. d.Add "Shuan", -13400
  295. d.Add "Shuang", -13398
  296. d.Add "Shui", -13395
  297. d.Add "Shun", -13391
  298. d.Add "Shuo", -13387
  299. d.Add "Si", -13383
  300. d.Add "Song", -13367
  301. d.Add "Sou", -13359
  302. d.Add "Su", -13356
  303. d.Add "Suan", -13343
  304. d.Add "Sui", -13340
  305. d.Add "Sun", -13329
  306. d.Add "Suo", -13326
  307. d.Add "Ta", -13318
  308. d.Add "Tai", -13147
  309. d.Add "Tan", -13138
  310. d.Add "Tang", -13120
  311. d.Add "Tao", -13107
  312. d.Add "Te", -13096
  313. d.Add "Teng", -13095
  314. d.Add "Ti", -13091
  315. d.Add "Tian", -13076
  316. d.Add "Tiao", -13068
  317. d.Add "Tie", -13063
  318. d.Add "Ting", -13060
  319. d.Add "Tong", -12888
  320. d.Add "Tou", -12875
  321. d.Add "Tu", -12871
  322. d.Add "Tuan", -12860
  323. d.Add "Tui", -12858
  324. d.Add "Tun", -12852
  325. d.Add "Tuo", -12849
  326. d.Add "Wa", -12838
  327. d.Add "Wai", -12831
  328. d.Add "Wan", -12829
  329. d.Add "Wang", -12812
  330. d.Add "Wei", -12802
  331. d.Add "Wen", -12607
  332. d.Add "Weng", -12597
  333. d.Add "Wo", -12594
  334. d.Add "Wu", -12585
  335. d.Add "Xi", -12556
  336. d.Add "Xia", -12359
  337. d.Add "Xian", -12346
  338. d.Add "Xiang", -12320
  339. d.Add "Xiao", -12300
  340. d.Add "Xie", -12120
  341. d.Add "Xin", -12099
  342. d.Add "Xing", -12089
  343. d.Add "Xiong", -12074
  344. d.Add "Xiu", -12067
  345. d.Add "Xu", -12058
  346. d.Add "Xuan", -12039
  347. d.Add "Xue", -11867
  348. d.Add "Xun", -11861
  349. d.Add "Ya", -11847
  350. d.Add "Yan", -11831
  351. d.Add "Yang", -11798
  352. d.Add "Yao", -11781
  353. d.Add "Ye", -11604
  354. d.Add "Yi", -11589
  355. d.Add "Yin", -11536
  356. d.Add "Ying", -11358
  357. d.Add "Yo", -11340
  358. d.Add "Yong", -11339
  359. d.Add "You", -11324
  360. d.Add "Yu", -11303
  361. d.Add "Yuan", -11097
  362. d.Add "Yue", -11077
  363. d.Add "Yun", -11067
  364. d.Add "Za", -11055
  365. d.Add "Zai", -11052
  366. d.Add "Zan", -11045
  367. d.Add "Zang", -11041
  368. d.Add "Zao", -11038
  369. d.Add "Ze", -11024
  370. d.Add "Zei", -11020
  371. d.Add "Zen", -11019
  372. d.Add "Zeng", -11018
  373. d.Add "Zha", -11014
  374. d.Add "Zhai", -10838
  375. d.Add "Zhan", -10832
  376. d.Add "Zhang", -10815
  377. d.Add "Zhao", -10800
  378. d.Add "Zhe", -10790
  379. d.Add "Zhen", -10780
  380. d.Add "Zheng", -10764
  381. d.Add "Zhi", -10587
  382. d.Add "Zhong", -10544
  383. d.Add "Zhou", -10533
  384. d.Add "Zhu", -10519
  385. d.Add "Zhua", -10331
  386. d.Add "Zhuai", -10329
  387. d.Add "Zhuan", -10328
  388. d.Add "Zhuang", -10322
  389. d.Add "Zhui", -10315
  390. d.Add "Zhun", -10309
  391. d.Add "Zhuo", -10307
  392. d.Add "Zi", -10296
  393. d.Add "Zong", -10281
  394. d.Add "Zou", -10274
  395. d.Add "Zu", -10270
  396. d.Add "Zuan", -10262
  397. d.Add "Zui", -10260
  398. d.Add "Zun", -10256
  399. d.Add "Zuo", -10254
  400.  
  401. Function g(num)
  402.     If num>0 And num<160 Then
  403.         g = Chr(num)
  404.     Else
  405.         If num< -20319 Or num> -10247 Then
  406.             g = ""
  407.         Else
  408.             a = d.Items
  409.             b = d.Keys
  410.             For i = d.Count -1 To 0 step -1
  411.                 If a(i)<= num Then Exit For
  412.             Next
  413.             g = b(i)
  414.         End If
  415.     End If
  416. End Function
  417.  
  418. 'ISblank  中间是否加空格(1=是; 0=否;)
  419.  
  420. Function ChangeToGB(Str, ISblank)
  421.     ChangeToGB = ""
  422.     For i = 1 To Len(Str)
  423.         If ISblank = 1 Then
  424.             ChangeToGB = ChangeToGB&" "& g(Asc(Mid(Str, i, 1)))
  425.         Else
  426.             ChangeToGB = ChangeToGB&g(Asc(Mid(Str, i, 1)))
  427.         End If
  428.     Next
  429. End Function
  430.  
  431. Response.Write ChangeToGB("这算不算是乱码")
  432. %>

 

 

 




Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee