index zh CN






Currency Converter

body, td, input, select, p{ font-family:[$TextFont]; font-size:[$TextFontSize]pt}

a:link { color: #0000FF; text-decoration: none }
a:visited { color: #0000FF; text-decoration: none }
a:hover { color: #FF0000; text-decoration: none }
a:active { color: #FF0000; text-decoration: none }

a:link.msg { color: #7DA1CD; text-decoration: none }
a:visited.msg { color: #7DA1CD; text-decoration: none }
a:hover.msg { color: #0000FF; text-decoration: none }
a:active.msg { color: #0000FF; text-decoration: none }







// Rś^XMLHTTPł[aŚ
var request = false;

try
{
0request = new XMLHttpRequest();
}
catch (trymicrosoft)
{
0try
{
00request = new ActiveXObject("Msxml2.XMLHTTP");
0}
catch (othermicrosoft)
{
00try
{
00 request = new ActiveXObject("Microsoft.XMLHTTP");
00}
catch (failed)
{
00 request = false;
00}
0}
}

if (!request)
alert("Error initializing XMLHttpRequest!");

// VŚżQpe
// request.readyState Spef:
// 0:BlĄl gŃSśQ((WŚ(u open() KNMR)0
// 1:Bl]~ś^zFOŹĄl gŃSśQ(Ś(u send() KNMR)0
// 2:Bl]~ŃSśQck(WYtKN-N(ŁŹę8^SNNT"^_0RQą[4YŁ)0
// 3:Bl]~Yt T"^-N8^ gŁRpencS(u FO/f gĄRhVŹĄl gŚ[bT"^0
// 4:T"^]Ś[b SNż gĄRhVT"^v^O(u[0
function UpdatePage() {
/*
if (request.readyState == 0)
alert("0");
else if (request.readyState == 1)
alert("1");
else if (request.readyState == 2)
alert("2");
else if (request.readyState == 3)
alert("3");
else if (request.readyState == 4)
alert("Server is done!");
*/
if (request.readyState == 4)
{
if (request.status == 200)
{
//alert("Server is done!");
//responseXML
var sText = request.responseText;
// ckRćg
var regExp = /]*?id=\"?currency_converter_result\"?[^>]*?>([\s\S]*?)/i;
var arr = regExp.exec(sText);
if(arr != null)
{
//alert(arr[1]);
var sRate = arr[1];
sRate = sRate.replace("", "");
document.getElementById("r").innerHTML = sRate;
var ratetime = new Date(request.getResponseHeader("Date"));
if(!isNaN(ratetime))
document.getElementById("t").innerHTML = request.getResponseHeader("Date") + " • " + ratetime.toLocaleString();
else
document.getElementById("t").innerHTML = "";
}
else
{
document.getElementById("t").innerHTML = "Error: parse failed";
//alert(sText);
}
}
else
{
document.getElementById("t").innerHTML = "Error: status code is " + request.status;
//alert("Error: status code is " + request.status);
}
}
}

function convertRate() {
var a = document.getElementById("a").value;
var from = document.getElementById("from").value;
var to = document.getElementById("to").value;
//var url = "http://www.lingoes.cn/aj.php?phone=" + escape(phone);
var url = "http://finance.google.com/finance/converter?a=" + a + "&from=" + from + "&to=" + to;
//alert(url);
// >f:yI{_ag
document.getElementById("r").innerHTML = "ck(WBlQ~ gĄR...";

// -NbkKNMRŃSśQ"vBl
//request.abort();

// Sb_N*NBl
// request-type:ŃSBl"v{|W0xQW"v

Wyszukiwarka

Podobne podstrony:
index zh CN
index zh CN
index zh CN
index zh CN
index zh CN
webengine zh CN
index zh TW
index zh TW
readme zh CN
index zh TW
index zh TW
help zh cn
index zh TW

więcej podobnych podstron