62,046
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
$(document).ready(function () {
$("#ImgBut").click(function () {
var str;
$("#sortable li").each(
function () {
str = str + $(this).attr('id');
})
Orders(str);
})
function Orders(con) {
$.ajax({
type: "post",
contentType: "application/json",
url: "select1.aspx/Orders",
data: "{con:" + con + "}",
datatype: "json",
success: function (data) {
if (data.d=="true") {
alert("正确!");
window.location.href = "/choose/select2.aspx"
}
else {
alert("排序错误!");
}
}
})
}
})
</script>
[WebMethod]
public static string Orders(string con)
{
string strcon = "undefinedli1li2li3li4li5li6li7li8li9li10li11li12li13li14";
if (strcon == con)
{
return "true";
}
else
{
return "false";
}
}
<td colspan="2" align="center" height="30px">
<img alt="单击提交" src="/images/tjwt.jpg" id="ImgBut" />
</td>