62,074
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<script language="javascript">
function RequestByPost(value)
{
var data;
data = '<?xml version="1.0" encoding="utf-8"?>';
data = data + '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"http://www.w3.org/2001/XMLSchema"http://schemas.xmlsoap.org/soap/envelope/">';
data = data + '<soap:Body>';
data = data + '<DeleteDraftRecord xmlns="http://tempuri.org/">';
data = data + '<recordID>'+value+'</recordID>';
data = data + '</DeleteDraftRecord>';
data = data + '</soap:Body>';
data = data + '</soap:Envelope>';
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
var URL="http://localhost:81/ws/Service1.asmx";
xmlhttp.Open("POST",URL, false);
xmlhttp.SetRequestHeader ("Content-Type","text/xml; charset=utf-8");
xmlhttp.SetRequestHeader ("SOAPAction","http://tempuri.org/DeleteDraftRecord");
xmlhttp.Send(data);
var result = xmlhttp.status;
if(result==200) {
document.write(xmlhttp.responseText);
}
alert(result);
}
</Script>
</head>
<body>
<input type="button" value="del" onclick="javascript:RequestByPost(99)"/>
</body>
</html>