Sharepoint 2010 use Client Object Model
http://www.codeproject.com/Articles/60348/SharePoint-2010-Client-Object-Model-for-JavaScript
Sharepoint 2007 use the below code
<script language="javascript" type="text/javascript" src="https://stackoverflow.com/questions/10004689/jquery-1.4.3.min.js"> </script>
<script language="javascript" src="jquery.SPServices-0.7.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$().SPServices({
operation: "GetListItems",
async: false,
listName: "[LIST NAME]",
CAMLViewFields: "<ViewFields><FieldRef Name=\"Status\" /><FieldRef Name=\"COLUMN NAME\" /><FieldRef Name=\"COLUMN NAME\" /></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function () {
var status = $(this).attr("ows_COLUMN NAME");
var createdDate = $(this).attr("ows_COLUMN NAME");
});
}
});
});
</script>
solved how to get data from a sharepoint list using java script and jquery? [closed]