季節問題
来源:互联网 发布:软件行业职位分类 编辑:程序博客网 时间:2024/06/06 07:44
<!DOCTYPE html>
<html>
<head>
<script src="/jquery/jquery-1.11.1.min.js">
</script>
<script>
$(document).ready(function(){
alert("#######");
var checkedSeasons = [];
$("#b1").click(function() {
var checkedSeasons = [];
alert(checkedSeasons);
$('input:checkbox[name="seasons"]:checked').each(function(){
checkedSeasons.push($(this).val());
$('#sp1').text(checkedSeasons);
});
});
});
</script>
</head>
<body>
<p>選択した季節: <span id="sp1"></span></p>
<input type="checkbox" name="seasons" value="spring"> 春
<input type="checkbox" name="seasons" value="summer"> 夏
<input type="checkbox" name="seasons" value="autumn"> 秋
<input type="checkbox" name="seasons" value="winter"> 冬
<input type="button" id="b1" value="ボタン1" /><br/>
</body>
</html>
<html>
<head>
<script src="/jquery/jquery-1.11.1.min.js">
</script>
<script>
$(document).ready(function(){
alert("#######");
var checkedSeasons = [];
$("#b1").click(function() {
var checkedSeasons = [];
alert(checkedSeasons);
$('input:checkbox[name="seasons"]:checked').each(function(){
checkedSeasons.push($(this).val());
$('#sp1').text(checkedSeasons);
});
});
});
</script>
</head>
<body>
<p>選択した季節: <span id="sp1"></span></p>
<input type="checkbox" name="seasons" value="spring"> 春
<input type="checkbox" name="seasons" value="summer"> 夏
<input type="checkbox" name="seasons" value="autumn"> 秋
<input type="checkbox" name="seasons" value="winter"> 冬
<input type="button" id="b1" value="ボタン1" /><br/>
</body>
</html>
阅读全文
0 0
- 季節問題
- cookie简单理解
- emacs coding UTF-8 保存报错
- java,web应用中,关于多用户访问,是不是就是一个用户等于一个线程? 50 那一般的时候是多用户多线程还是多用户单线程。 6S根本停不下来 | 浏览 2065 次 我有更好的答案 发布于2016-
- 静态代理和动态代理的简单实现
- < 笔记 > JavaScript
- 季節問題
- java多线程之守护线程(Daemon)
- ImagesUtils 工具类Imagelolder
- 学习hibernate中的一些问题及知识(2)
- gStore 之 VS*-Tree
- 刷爆朋友圈的“可以喝的书”,你还记得吗?
- 从JDK源码角度看Float
- Windows下添加MySQL服务到系统服务以及注意事项
- 清除本地数据缓存