私は SharePoint の SPServices を始めたばかりですが、私のニーズに合わせたビジネスになる可能性があるようです。つまり、リスト内の値をプログラムで更新します。
テストとして、次のコードを試して、jQueryList という名前のリストの Title 列を 1 つの行 (ID=1) で更新してみました。
<script src="..../js/jquery.SPServices-0.7.1a.min.js" type="text/javascript"></script>
<script src="..../js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(#inhere).html(waitMessage).SPServices({
operation: "UpdateListItems",
listName: jQueryList,
ID: 1,
valuepairs: [["Title", "eggs"]],
completefunc: function (xData, Status) {
var out = $().SPServices.SPDebugXMLHttpResult({
node: xData.responseXML,
outputId: inhere
});
$(#inhere).html("").append("<b>This is the output from the UpdateListItems operation:</b>" + out);
$(#inhere).append("<b>Refresh to see the change in the list above.</b>");
}
});
}
</script>
<div id="inhere">
</div>
これを CEWP のリスト jQueryList の一番下に配置しましたが、行の値が更新されません。質問の初心者スタイルについてお詫び申し上げますが、誰かが何か指針を持っていれば、私はそれを大いに感謝します. 注: ID 値は、デフォルト ビューに ID 列を表示して取得します。
敬具 / コルム