可能重复:
使用jQuery检查复选框选中的属性
我没有选中复选框时遇到问题.
这是我的示例代码:
$(".get-the-look ul input").click(function(){
if("this:checked") {
var product = $(this).attr('alt');
$("#bob div").remove('.'+product);
} else {
alert('asdasd');
}
});
Run Code Online (Sandbox Code Playgroud)
但警报(如果未选中复选框)从不会触发......无论复选框处于什么状态,"其他"都不会启动?
我不知道我哪里出错了.
| 归档时间: |
|
| 查看次数: |
20416 次 |
| 最近记录: |