<script> <BR>//unicode转换为字符 <BR>function unicode2Chr(str) { <BR> if ('' != str) { <BR> var st, t, i <BR> st = ''; <BR> for (i = 1; i <= str.length/4; i ++){ <BR> t = str.slice(4*i-4, 4*i-2); <BR> t = str.slice(4*i-2, 4*i).concat(t); <BR> st = st.concat('%u').concat(t); <BR> } <BR> st = unescape(st); <BR> return(st); <BR> } <BR> else <BR> return(''); <BR>} <BR>//字符转换为unicode <BR>function chr2Unicode(str) { <BR> if ('' != str) { <BR> var st, t, i; <BR> st = ''; <BR> for (i = 1; i <= str.length; i ++){ <BR> t = str.charCodeAt(i - 1).toString(16); <BR> if (t.length < 4) <BR> while(t.length <4) <BR> t = '0'.concat(t); <BR> t = t.slice(2, 4).concat(t.slice(0, 2)) <BR> st = st.concat(t); <BR> } <BR> return(st.toUpperCase()); <BR> } <BR> else { <BR> return(''); <BR> } <BR>} <br><br>var http_request = false; <BR>function getRequest(url) { <BR> http_request = false; <BR> if (window.XMLHttpRequest) { // Mozilla, Safari,... <BR> http_request = new XMLHttpRequest(); <BR> if (http_request.overrideMimeType) { <BR> http_request.overrideMimeType('text/xml'); <BR> } <BR> } else if (window.ActiveXObject) { // IE <BR> try { <BR> http_request = new ActiveXObject("Msxml2.XMLHTTP"); <BR> } catch (e) { <BR> try { <BR> http_request = new ActiveXObject("Microsoft.XMLHTTP"); <BR> } catch (e) {} <BR> } <BR> } <BR> if (!http_request) { <BR> return false; <BR> } <BR> http_request.onreadystatechange = showtlinfo; <BR> http_request.open('GET', url, true); <BR> http_request.send(null); <BR>} <br><br>function showtlinfo() { <BR> if (http_request.readyState == 4) { <BR> if (http_request.status == 200) { <BR> txt=http_request.responseText; <BR> document.noname=txt; <BR> document.all.noname.innerHTML=txt; <BR> } else { <BR> return; <BR> } <BR> } <BR>} <BR>function tlinfo() <BR>{ <BR> var xml=new ActiveXObject("Microsoft.XMLDOM"); <BR> xml.async="false"; <BR> xml.load("http://my.x-push.net/xml/805128.xml"); <BR> if(xml.parseError!=0) <BR> { <BR> getRequest("http://my.x-push.net/getxml.asp?no=805128"); <BR> return; <BR> } <BR> var root=xml.documentElement; <BR> txt=root.childNodes(1).text; <BR> document.noname=txt; <BR> document.all.noname.innerHTML=txt; <BR>} <BR>tlinfo(); <BR></script>
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn