$('#mySelectBox option').each(function() {
if ($(this).isChecked())
alert('this option is selected');
else
alert('this is not');
});
Run Code Online (Sandbox Code Playgroud)
显然,这isChecked不起作用.所以我的问题是这样做的正确方法是什么?谢谢.
我试图访问arguments.callee下面的简单函数中的属性,但我无法访问,因为该函数抛出错误。
function foo(a = 50, b) {
console.log(arguments.callee);
}
foo(10, 50);Run Code Online (Sandbox Code Playgroud)
为什么会发生这种情况?看起来该函数正在严格模式下运行,但是这怎么可能,因为我没有提到该语句'use strict';
我在 Chrome 上运行这个。