如何用JS取listview每一项的ID
前台代码
<head>
<meta charset="utf-8">
<title>ListView拖动测试</title>
<link rel="stylesheet" href="Styles/jquery.ui.all.css">
<script src="Scripts/jquery-1.4.4.js"></script>
<script src="Scripts/jquery.ui.core.js"></script>
<script src="Scripts/jquery.ui.widget.js"></script>
<script src="Scripts/jquery.ui.mouse.js"></script>
<script src="Scripts/jquery.ui.sortable.js"></script>
<link rel="stylesheet" href="Styles/demos.css">
<style>
#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; }
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
</style>
<script>
$(function () {
$("#sortable1, #sortable2").sortable({
connectWith: ".connectedSortable"
}).disableSelection();
$(".sortable").sortable("toArray");
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<ul id="sortable1" class="connectedSortable">
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceHolder" runat="server">
</asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<div class="sortable">
<div class="item">
<table class="sortable" >
<tr style="background-color: #E0FFFF;color: #333333;">
<td>
<p class="title">
<%#Eval("Country") %></p>
</td>
</tr>
</table>
</div>
</div>
</ItemTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:FormulaDBConnectionString2 %>"
SelectCommand="SELECT [Region], [Country] FROM [PriceRegionSet]">
</asp:SqlDataSource>
</ul>
<ul id="sortable2" class="connectedSortable">
<asp:ListView ID="ListView2" runat="server" DataSourceID="SqlDataSource1" >
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceHolder" runat="server">
</asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<div class="sortable">
<div class="item">
<table class="sortable">
<tr style="background-color: #E0FFFF;color: #333333;">
<td>
<p class="title">
<%#Eval("Region") %></p>
</td>
</tr>
</table>
</div>
</div>
</ItemTemplate>
</asp:ListView>
</ul>
</div>
</form>
</body>
listview通过拖动,内容项改变了,如何用JS取左边listview每一项的ID