`
收藏列表
标题 标签 来源
Ajax调用 ajax
/**
 * 方法名:httpGet
 * 参数:http Xmlhttp对象;url 要检测页面的URL
 * 返回值:整个页面的HTML或者为空字符串
 * 方法说明:利用xmlhttp对象去判断相应的URL所指向的页面,是否存在
 * 调用示例如下:httpGet(xmlhttp," http://localhost:6767/t4new/tr/cheque/checkIn/CheckInList.do")
 */
function httpGet(http,url)
{
   var strRet = "";
   if(url.length!=0)
   {
        http.open("GET",url,false);
        http.send();
        strRet = http.responseText;
    }
    strRet = trimNC(strRet);
    if (strRet.length==0)
	{
		 alert("系统查询失败!");
         return "";
	}
    return strRet;
}
//add by xlc post 提交

function httpPost(http,url,param)
{
   var strRet = "";
   if(url.length!=0)
   {
        http.open("POST",url,false);
        http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
   
        http.send(param);
        strRet = http.responseText;
    }
    strRet = trimNR(strRet);
    if (strRet.length==0)
	{
         return "N";
	}
    return strRet;
}
Global site tag (gtag.js) - Google Analytics