日期:2014-05-17 浏览次数:21107 次
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="script/jquery-1.7.1.min.js">
</script>
<script type="text/javascript">
$(function () {
$("input[type='checkbox']").click(function () {
if (this.checked == true) {
var div = $("<div class='checkvalue' value='" + $(this).attr("value") + "'>" + $(this).attr("value") + "</div>");
$("#titlelist").append(div);
} else {
var child = $("#titlelist").children("div[value='" + $(this).attr("value") + "']");
$(child).remove();
}
});
});
function showValue() {
var valueList = $(".checkvalue");
for (var i = 0; i < valueList.length; i++) {
&n