var xmlhttp;
function createxmlhttprequest()
{
if(window.ActiveXObject)
{
xmlhttp=new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP');
}
}
function sendstring(frmID,URL)
{
//debugger;
createxmlhttprequest();
xmlhttp.onreadystatechange=statechange;
xmlhttp.open('POST',URL,false);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send(getFormQueryString(frmID));
//xmlhttp.send("gwid=30&sign_5=11222112");
}
function statechange()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("mess").innerHTML=xmlhttp.responseText;
}
}
//寰楀埌涓€涓〃鍗曢噷鐨勫叏閮ㄤ俊鎭?
function getFormQueryString(frmID)
{
var frmID=document.getElementById(frmID);
var i,queryString = "", and = "";
var item; // for each form's object
var itemValue;// store each form object's value
for( i=0;i<frmID.length;i++ )
{
//
item = frmID[i];
if ( item.name!=''&&item.name!='__VIEWSTATE' )
{
//debugger;
if ( item.type == 'button' || item.type == 'submit' || item.type == 'reset' || item.type == 'image')
{// ignore this type
continue;
} else
{
itemValue = item.value;
}
itemValue = encodeURIComponent(itemValue);
queryString += and + item.name + '=' + itemValue;
and="&";
}
}
//debugger;
return queryString;
}
//ajax鎻愪氦琛ㄥ崟
function submitForm(frmID,URL)
{
sendstring(frmID,URL);
}
function InitSealPage(url)
{
createxmlhttprequest();
xmlhttp.onreadystatechange=Initchange;
xmlhttp.open('get',url,false);
xmlhttp.send('');
}
function Initchange()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("acticleTitle").innerHTML=xmlhttp.responseText;
}
}
//初始化印章信息
function InitSealData(url)
{
createxmlhttprequest();
xmlhttp.onreadystatechange=InitSealchange;
xmlhttp.open('get',url,false);
xmlhttp.send('');
}
function InitSealchange()
{
var sealData="";
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
sealData=xmlhttp.responseText;
}
return sealData;
}