我正在使用这个jQuery函数,但是当我运行我的应用程序时,此函数不会执行。jquery函数没有执行
实际控制去这个func.but不去这里面执行代码。
是什么原因?
这个func.is用于检查无线电广播。
$("input[type='radio']").click(function() {
var previousValue = $(this).attr('previousValue');
var name = $(this).attr('name');
if (previousValue == 'checked') {
$(this).removeAttr('checked');
$(this).attr('previousValue', false);
} else {
$("input[name=" + name + "]:radio").attr('previousValue', false);
$(this).attr('previousValue', 'checked');
}
});
什么是你想在这里做什么? –
我想检查取消选中无线电输入。 – user2243331
是的,我得到了,但什么是'previousValue' –