Chinaunix首页 | 论坛 | 博客
  • 博客访问: 156726
  • 博文数量: 31
  • 博客积分: 2085
  • 博客等级: 大尉
  • 技术积分: 350
  • 用 户 组: 普通用户
  • 注册时间: 2005-11-07 13:16
文章分类

全部博文(31)

文章存档

2014年(1)

2011年(4)

2010年(6)

2009年(2)

2008年(2)

2007年(5)

2006年(8)

2005年(3)

我的朋友

分类: 系统运维

2010-02-09 14:49:58

在站点'的“中文题库”列表中新加一条,其“Title”字段为“test”
关键字: JavaScript Sharepoint list Web Servive SOAP XMLHttpRequest
 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test Page</title>
<meta name="Microsoft Theme" content="Verdant 1011, default">

<script type="text/javascript">
function SaveListItem()
{
var soapRequest = '' +
'' +
''+
''+
'中文题库'+
''+
''+
''+
'test'+
''+
''+
''+
''+
''+
'';

xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open('post', '_vti_bin/Lists.asmx', false,null,null);
xmlHttp.setRequestHeader('Content-Type','application/soap+xml; charset=utf-8');

xmlHttp.send(soapRequest);
}

function createXmlHttpRequest(){
        if(window.ActiveXObject){ //for IE
            return new ActiveXObject("Microsoft.XMLHTTP");
        }else if(window.XMLHttpRequest){ //Non-IE Browser
            return new XMLHttpRequest();
        }
    }
</script>

</head>
<body>
<input type="button" onclick="SaveListItem()" value="Go">
</body>
</html>


阅读(711) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~