//把编码转换成 gb2312编码
function UrlEncode(str)
{
var i, c, ret="", strSpecial="!\"#$%&'()*+,/:;<=>?@[\]^`{|}~%";
for(i = 0; i < str.length; i++)
{
//alert(str.charCodeAt(i));
c = str.charAt(i);
if(c==" ")
ret+="+";
else if(strSpecial.indexOf(c)!=-1)
ret += "%" + str.charCodeAt(i).toString(16);
if(z[str.charCodeAt(i)] != null)
{
d = z[str.charCodeAt(i)];
try
{
ret += "%" + d.slice(0,2) + "%" + d.slice(-2);
}
catch (e)
{
alert(" $$ error name = " + e.name + ", message = " +e.message + ", d " + i + "= " + str.charCodeAt(i))
}
}
else
ret += c;
}
return ret;
}
function getSpell(str, sp)
{
var i, c, t, ret="";
if(sp == null)
sp="";
for(i = 0; i < str.length; i++)
{
if(str.charCodeAt(i) >= 0x4e00)
{
c = parseInt(z[str.charCodeAt(i)], 16);
if(c < 55290)
{
for(t = qswhSpell.length-1; t > 0; t = t - 2)
if(qswhSpell[t] <= c)
break;
if(t > 0)
ret += qswhSpell[t - 1] + sp;
}
}
}
return ret.substr(0, ret.length-sp.length);
}
var z = new Array();z[0x00A4]='A1E8';z[0x00A7]='A1EC';z[0x00A8]='A1A7';z[0x00B0]='A1E3';z[0x00B1]='A1C0';z[0x00B7]='A1A4';z[0x00D7]='A1C1';z[0x00E0]='A8A4';z[0x00E1]='A8A2';z[0x00E8]='A8A8';z[0x00E9]='A8A6';z[0x00EA]='A8BA';z[0x00EC]='A8AC';z[0x00ED]='A8AA';z[0x00F2]='A8B0';z[0x00F3]='A8AE';z[0x00F7]='A1C2';z[0x00F9]='A8B4';z[0x00FA]='A8B2';z[0x00FC]='A8B9';z[0x0101]='A8A1';z[0x0113]='A8A5';z[0x011B]='A8A7';z[0x012B]='A8A9';z[0x014D]='A8AD';z[0x016B]='A8B1';z[0x01CE]='A8A3';z[0x01D0]='A8AB';z[0x01D2]='A8AF';z[0x01D4]='A8B3';z[0x01D6]='A8B5';z[0x01D8]='A8B6';z[0x01DA]='A8B7';z[0x01DC]='A8B8';z[0x02C7]='A1A6';z[0x02C9]='A1A5';z[0x0391]='A6A1';z[0x0392]='A6A2';z[0x0393]='A6A3';z[0x0394]='A6A4';z[0x0395]='A6A5';z[0x0396]='A6A6';z[0x0397]='A6A7';z[0x0398]='A6A8';z[0x0399]='A6A9';z[0x039A]='A6AA';z[0x039B]='A6AB';z[0x039C]='A6AC';z[0x039D]='A6AD';z[0x039E]='A6AE';z[0x039F]='A6AF';z[0x03A0]='A6B0';z[0x03A1]='A6B1';z[0x03A3]='A6B2';z[0x03A4]='A6B3';z[0x03A5]='A6B4';z[0x03A6]='A6B5';z[0x03A7]='A6B6';z[0x03A8]='A6B7';z[0x03A9]='A6B8';z[0x03B1]='A6C1';z[0x03B2]='A6C2';z[0x03B3]='A6C3';z[0x03B4]='A6C4';z[0x03B5]='A6C5';z[0x03B6]='A6C6';z[0x03B7]='A6C7';z[0x03B8]='A6C8';z[0x03B9]='A6C9';z[0x03BA]='A6CA';z[0x03BB]='A6CB';z[0x03BC]='A6CC';z[0x03BD]='A6CD';z[0x03BE]='A6CE';z[0x03BF]='A6CF';z[0x03C0]='A6D0';z[0x03C1]='A6D1';z[0x03C3]='A6D2';z[0x03C4]='A6D3';z[0x03C5]='A6D4';z[0x03C6]='A6D5';z[0x03C7]='A6D6';z[0x03C8]='A6D7';z[0x03C9]='A6D8';z[0x0401]='A7A7';z[0x0410]='A7A1';z[0x0411]='A7A2';z[0x0412]='A7A3';z[0x0413]='A7A4';z[0x0414]='A7A5';z[0x0415]='A7A6';z[0x0416]='A7A8';z[0x0417]='A7A9';z[0x0418]='A7AA';z[0x0419]='A7AB';z[0x041A]='A7AC';z[0x041B]='A7AD';z[0x041C]='A7AE';z[0x041D]='A7AF';z[0x041E]='A7B0';z[0x041F]='A7B1';z[0x0420]='A7B2';z[0x0421]='A7B3';z[0x0422]='A7B4';z[0x0423]='A7B5';z[0x0424]='A7B6';z[0x0425]='A7B7';z[0x0426]='A7B8';z[0x0427]='A7B9';z[0x0428]='A7BA';z[0x0429]='A7BB';z[0x042A]='A7BC';z[0x042B]='A7BD';z[0x042C]='A7BE';z[0x042D]='A7BF';z[0x042E]='A7C0';z[0x042F]='A7C1';z[0x0430]='A7D1';z[0x0431]='A7D2';z[0x0432]='A7D3';z[0x0433]='A7D4';z[0x0434]='A7D5';z[0x0435]='A7D6';z[0x0436]='A7D8';z[0x0437]='A7D9';z[0x0438]='A7DA';z[0x0439]='A7DB';z[0x043A]='A7DC';z[0x043B]='A7DD';z[0x043C]='A7DE';z[0x043D]='A7DF';z[0x043E]='A7E0';z[0x043F]='A7E1';z[0x0440]='A7E2';z[0x0441]='A7E3';z[0x0442]='A7E4';z[0x0443]='A7E5';z[0x0444]='A7E6';z[0x0445]='A7E7';z[0x0446]='A7E8';z[0x0447]='A7E9';z[0x0448]='A7EA';z[0x0449]='A7EB';z[0x044A]='A7EC';z[0x044B]='A7ED';z[0x044C]='A7EE';z[0x044D]='A7EF';z[0x044E]='A7F0';z[0x044F]='A7F1';z[0x0451]='A7D7';z[0x2014]='A1AA';z[0x2016]='A1AC';z[0x2018]='A1AE';z[0x2019]='A1AF';z[0x201C]='A1B0';z[0x201D]='A1B1';z[0x2026]='A1AD';z[0x2030]='A1EB';z[0x2032]='A1E4';z[0x2033]='A1E5';z[0x203B]='A1F9';z[0x2103]='A1E6';z[0x2116]='A1ED';z[0x2160]='A2F1';z[0x2161]='A2F2';z[0x2162]='A2F3';z[0x2163]='A2F4';z[0x2164]='A2F5';z[0x2165]='A2F6';z[0x2166]='A2F7';z[0x2167]='A2F8';z[0x2168]='A2F9';z[0x2169]='A2FA';z[0x216A]='A2FB';z[0x216B]='A2FC';z[0x2190]='A1FB';z[0x2191]='A1FC';z[0x2192]='A1FA';z[0x2193]='A1FD';z[0x2208]='A1CA';z[0x220F]='A1C7';z[0x2211]='A1C6';z[0x221A]='A1CC';z[0x221D]='A1D8';z[0x221E]='A1DE';z[0x2220]='A1CF';z[0x2225]='A1CE';z[0x2227]='A1C4';z[0x2228]='A1C5';z[0x2229]='A1C9';z[0x222A]='A1C8';z[0x222B]='A1D2';z[0x222E]='A1D3';z[0x2234]='A1E0';z[0x2235]='A1DF';z[0x2236]='A1C3';z[0x2237]='A1CB';z[0x223D]='A1D7';z[0x2248]='A1D6';z[0x224C]='A1D5';z[0x2260]='A1D9';z[0x2261]='A1D4';z[0x2264]='A1DC';z[0x2265]='A1DD';z[0x226E]='A1DA';z[0x226F]='A1DB';z[0x2299]='A1D1';z[0x22A5]='A1CD';z[0x2312]='A1D0';z[0x2460]='A2D9';z[0x2461]='A2DA';z[0x2462]='A2DB';z[0x2463]='A2DC';z[0x2464]='A2DD';z[0x2465]='A2DE';z[0x2466]='A2DF';z[0x2467]='A2E0';z[0x2468]='A2E1';z[0x2469]='A2E2';z[0x2474]='A2C5';z[0x2475]='A2C6';z[0x2476]='A2C7';z[0x2477]='A2C8';z[0x2478]='A2C9';z[0x2479]='A2CA';z[0x247A]='A2CB';z[0x247B]='A2CC';z[0x247C]='A2CD';z[0x247D]='A2CE';z[0x247E]='A2CF';z[0x247F]='A2D0';z[0x2480]='A2D1';z[0x2481]='A2D2';z[0x2482]='A2D3';z[0x2483]='A2D4';z[0x2484]='A2D5';z[0x2485]='A2D6';z[0x2486]='A2D7';z[0x2487]='A2D8';z[0x2488]='A2B1';z[0x2489]='A2B2';z[0x248A]='A2B3';z[0x248B]='A2B4';z[0x248C]='A2B5';z[0x248D]='A2B6';z[0x248E]='A2B7';z[0x248F]='A2B8';z[0x2490]='A2B9';z[0x2491]='A2BA';z[0x2492]='A2BB';z[0x2493]='A2BC';z[0x2494]='A2BD';z[0x2495]='A2BE';z[0x2496]='A2BF';z[0x2497]='A2C0';z[0x2498]='A2C1';z[0x2499]='A2C2';z[0x249A]='A2C3';z[0x249B]='A2C4';z[0x2500]='A9A4';z[0x2501]='A9A5';z[0x2502]='A9A6';z[0x2503]='A9A7';z[0x2504]='A9A8';z[0x2505]='A9A9';z[0x2506]='A9AA';z[0x2507]='A9AB';z[0x2508]='A9AC';z[0x2509]='A9AD';z[0x250A]='A9AE';z[0x250B]='A9AF';z[0x250C]='A9B0';z[0x250D]='A9B1';z[0x250E]='A9B2';z[0x250F]='A9B3';z[0x2510]='A9B4';z[0x2511]='A9B5';z[0x2512]='A9B6';z[0x2513]='A9B7';z[0x2514]='A9B8';z[0x2515]='A9B9';z[0x2516]='A9BA';z[0x2517]='A9BB';z[0x2518]='A9BC';z[0x2519]='A9BD';z[0x251A]='A9BE';z[0x251B]='A9BF';z[0x251C]='A9C0';z[0x251D]='A9C1';z[0x251E]='A9C2';z[0x251F]='A9C3';z[0x2520]='A9C4';z[0x2521]='A9C5';z[0x2522]='A9C6';z[0x2523]='A9C7';z[0x2524]='A9C8';z[0x2525]='A9C9';z[0x2526]='A9CA';z[0x2527]='A9CB';z[0x2528]='A9CC';z[0x2529]='A9CD';z[0x252A]='A9CE';z[0x252B]='A9CF';z[0x252C]='A9D0';z[0x252D]='A9D1';z[0x252E]='A9D2';z[0x252F]='A9D3';z[0x2530]='A9D4';z[0x2531]='A9D5';z[0x2532]='A9D6';z[0x2533]='A9D7';z[0x2534]='A9D8';z[0x2535]='A9D9';z[0x2536]='A9DA';z[0x2537]='A9DB';z[0x2538]='A9DC';z[0x2539]='A9DD';z[0x253A]='A9DE';z[0x253B]='A9DF';z[0x253C]='A9E0';z[0x253D]='A9E1';z[0x253E]='A9E2';z[0x253F]='A9E3';z[0x2540]='A9E4';z[0x2541]='A9E5';z[0x2542]='A9E6';z[0x2543]='A9E7';z[0x2544]='A9E8';z[0x2545]='A9E9';z[0x2546]='A9EA';z[0x2547]='A9EB';z[0x2548]='A9EC';z[0x2549]='A9ED';z[0x254A]='A9EE';z[0x254B]='A9EF';z[0x25A0]='A1F6';z[0x25A1]='A1F5';z[0x25B2]='A1F8';z[0x25B3]='A1F7';z[0x25C6]='A1F4';z[0x25C7]='A1F3';z[0x25CB]='A1F0';z[0x25CE]='A1F2';z[0x25CF]='A1F1';z[0x2605]='A1EF';z[0x2606]='A1EE';z[0x2640]='A1E2';z[0x2642]='A1E1';z[0x3000]='A1A1';z[0x3001]='A1A2';z[0x3002]='A1A3';z[0x3003]='A1A8';z[0x3005]='A1A9';z[0x3008]='A1B4';z[0x3009]='A1B5';z[0x300A]='A1B6';z[0x300B]='A1B7';z[0x300C]='A1B8';z[0x300D]='A1B9';z[0x300E]='A1BA';z[0x300F]='A1BB';z[0x3010]='A1BE';z[0x3011]='A1BF';z[0x3013]='A1FE';z[0x3014]='A1B2';z[0x3015]='A1B3';z[0x3016]='A1BC';z[0x3017]='A1BD';z[0x3041]='A4A1';z[0x3042]='A4A2';z[0x3043]='A4A3';z[0x3044]='A4A4';z[0x3045]='A4A5';z[0x3046]='A4A6';z[0x3047]='A4A7';z[0x3048]='A4A8';z[0x3049]='A4A9';z[0x304A]='A4AA';z[0x304B]='A4AB';z[0x304C]='A4AC';z[0x304D]='A4AD';z[0x304E]='A4AE';z[0x304F]='A4AF';z[0x3050]='A4B0';z[0x3051]='A4B1';z[0x3052]='A4B2';z[0x3053]='A4B3';z[0x3054]='A4
上一个:使用Modello编写JavaScript类
下一个:在window.setTimeout方法中传送对象