JQuery 球队选择案例
2013-07-03 11:06
330 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#tableToSelect tr").css("cursor", "pointer").mouseover(function () {
$(this).css("backgroundColor", "gold");
$(this).siblings().css("backgroundColor", "white");
})
.click(function () {
$(this).appendTo($("#tableSelected"));
});
});
</script>
</head>
<body>
待选择球队:
<table id="tableToSelect">
<tr><td>火箭</td><td>100分</td></tr>
<tr><td>奇才</td><td>99分</td></tr>
<tr><td>小牛</td><td>98分</td></tr>
</table>
<hr />
<hr />
选中的球队:
<table id="tableSelected"></table>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#tableToSelect tr").css("cursor", "pointer").mouseover(function () {
$(this).css("backgroundColor", "gold");
$(this).siblings().css("backgroundColor", "white");
})
.click(function () {
$(this).appendTo($("#tableSelected"));
});
});
</script>
</head>
<body>
待选择球队:
<table id="tableToSelect">
<tr><td>火箭</td><td>100分</td></tr>
<tr><td>奇才</td><td>99分</td></tr>
<tr><td>小牛</td><td>98分</td></tr>
</table>
<hr />
<hr />
选中的球队:
<table id="tableSelected"></table>
</body>
</html>
相关文章推荐
- jquery实现仿火车官网城市选择切换案例
- jQuery案例----注册时选择阅读条款
- jQuery 案例(下拉选择框右移)
- jQuery总结第四天(选择案例解析)
- jQuery进度条插件rangeSlider,带刻度,rangeSlider实现进度范围选择案例
- jQuery案例_@注册时选择阅读条款_@左右移动
- JQuery球队选择实例
- jQuery总结第四天(选择案例解析)
- jQuery案例_@注册时选择阅读条款_@左右移动
- 【jQuery】uploadify,实际开发案例【选择完文件点击上传才上传】
- JQuery球队选择实例
- jQuery总结第四天(选择案例解析)
- jQuery树形下拉菜单插件ztree,输入框选择树形菜单内容案例
- jquery城市选择案例
- jQuery判断单选框,多选框是否选择简单案例
- jquery省市选择案例
- jquery03-08城市选择案例
- 夺命雷公狗jquery---34导航条案例之下拉选择
- 9 款样式华丽的 jQuery 日期选择和日历控件
- 解决jquery-ui-autocomplete选择列表被Bootstrap模态窗遮挡的问题