在頁面上導入js
jquery
jquery
注意
·建table
<table id="table
<tr id="
<tr id="
<tr id="
<tr id="
<tr id="
<tr id="
</table>
·插入js代碼
<script type="text/javascript">
$(document)
$("#table
});
</script>
·ok
·例子
<%
String path = request
String basePath = request
pageContext
%>
<!DOCTYPE HTML PUBLIC "
<html>
<head>
<script type="text/javascript"
src="${basePath}common/js/jquery
<script type="text/javascript"
src="${basePath}common/js/jquery
<style type="text/css">
background: #
}
background: #
}
</style>
<script type="text/javascript">
$(document)
color();
$("#table
onDrop:function(table
var b = $(row)
color();
}
});
});
function color()
{
var tbody = $("table[id=
tbody
var cc = index%
if(
{
$(this)
$(this)
}
else
{
$(this)
$(this)
}
});
}
</script>
</head>
<body>
<table id="table
<tr id="
<tr id="
<tr id="
<tr id="
<tr id="
<tr id="
</table>
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20077.html