var wFrm,wInsElem
function UseAjax(wOper,wMethod,wURL,wPara) {
wMethod=wMethod.toUpperCase();
if (wMethod=="GET") {
SendData=null;
}
else {
SendData=wPara;
}
if(window.XMLHttpRequest){
var xmlHttp=new window.XMLHttpRequest();
}
else if(window.ActiveXObject){
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
//var xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
xmlHttp.open(wMethod,wURL, true);
xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded;charset=gb2312');
xmlHttp.onreadystatechange=function() {
if (xmlHttp.readyState==4&&xmlHttp.status==200) {
var doc=xmlHttp.responseText;
if (wOper=='DF') {
wPara.value=doc+'顶';
wPara.onclick=Function('alert(\'您已经顶过了,刷顶是可耻的!\')\;');
wPara.disabled=null;
alert('感谢您的支持!');
}
else if (wOper=='HF') {
ReAr=doc.substr(doc.length-2);
if (ReAr=="00") {
dt=new Date();
myyear=dt.getYear();
mymonth=dt.getMonth()+1;
myday=dt.getDate();
myyear=(myyear>200)?myyear:1900+myyear;
datetime=myyear+'-'+mymonth+'-'+myday;
Temp_frm=new Array();
for (i=1;i
'; newRe+=Temp_frm[5]+'
'; if (wInsElem) { if (document.all) { wInsElem.insertAdjacentHTML('afterEnd',newRe); } else { range=wInsElem.ownerDocument.createRange(); range.setStartAfter(wInsElem); newRe=range.createContextualFragment(newRe); wInsElem.parentNode.insertBefore(newRe,wInsElem.nextSibling); } } } alert(doc.substr(doc,doc.length-2)); for (i=0;i