日期:2014-05-16 浏览次数:20384 次
$('input[type=checkbox]:checked').each(function(){
alert($(this).val());
});var regexp = /^\d{4}-\d{2}-\d{2}$/;
if(!regexp.exec(date)){
alert('日期格式不正确');
}//字符串转整数 parseInt(str) //字符串转浮点数 parseFloat(str)
//选中
$('#id').is(':checked') == true
//没有选中
$('#id').is(':checked') == false//选中
$('#id').attr('checked', 'checked')
//取消选中
$('#id').attr('checked', false)// array 数组
// index 数组索引
// value 数组元素,不需要用val()函数获取值
$.each(array, function(index, value){
});items.each(function(i){
// i是索引
var value = $(this).val();
});$('#id').css('display', 'none');
if($('#id')[0].style.display == '')